<p>I am still learning how to work with craft on the back end but so far I can see it is a very powerful platform!</p>
<p>I was wondering if there is a way that within an existing entry channel say &quot;foo&quot; I have an entry comprised of a table made up of multiple numerical values under specific headings (say column A has a value of 1, B:2, C:3,..Z:X)- I was wondering if there is any way that I can grab the values in columns A:1 and B:2 from the table entry in channel &quot;foo&quot; and create a new entry under a different existing channel &quot;bar&quot; where those two values A:1 and B:2 are pre-filled in the new entry type form?</p>
<p>Apologies if this is confusing- I am attempting to eliminate the steps involved in copying values from one entry type (large table of values) to another entry type (a form made up of fields that make up content on the front end of the site) and consolidate it into one step where I can find the row containing the values I need in channel &quot;foo&quot; and just click to create a new entry type with those values pre-populated in channel &quot;bar&quot;- eliminating the need to copy and paste the values.</p>
<p>I am not sure how to tackle this or where to begin as I am still new with the platform.</p>
<p>Thank you in advance for any help!</p>

CC BY-SA 4.0
2020-10-01T09:19:43.693Z
Hey! This is an interesting question. Are you able to share a little more context? There might be an alternative way to achieve what you're asking. Are the values for A,B,C etc always going to be the same?
dmatthams
CC BY-SA 4.0
2020-10-01T14:48:09.100Z
@dmatthams Yes! I have a Channel "foo" which contains an entry-"Entry 1" and "Entry 1" contains a table with lets say 4 columns - A,B,C,D. The table has the values pre-inserted for A,B,C,D in the rows. Currently, if I want the values from columns C and D inserted into a new Entry under channel "bar" I have to go in and find the row which corresponds to the data I want and individually copy those values from "foo"->"Entry 1" to "bar"->New Entry. Is it possible to create a new entry within a different channel with C & D pre-populated on save, or maybe a lightswitch toggle? Thank you!
Gideon B
CC BY-SA 4.0
2020-10-02T03:08:11.673Z
@dmatthams I am wondering if this is a situation where I would use relations? I guess for clarification, the idea is that I can pre-enter a series of relative latitude and longitude values in an entry table and then, whether through a lightswitch or check I can toggle that pair of values from the longitude or latitude columns to pre-populate into a 'latitude' and 'longitude field in a different entry which is then linked to a marker which displays on a leaflet map on the front end. Or if there is an easier way to do this? Thank you again!
Gideon B
CC BY-SA 4.0
2020-10-02T08:33:08.177Z
Yes I'm wondering if relations would help here. You could potentially have two new sections (or perhaps categories is better suited), one for lat, one for long. All the lat entries could have a relation to the associated long, and vice versa. Then in your "foo" channel you create a relation that allows you to select the lat or long entries. On your front end you can then pull the related lat/long. Does this make sense?
dmatthams
CC BY-SA 4.0
2020-10-02T21:18:49.017Z
Just wanted to let you know but I made some progress. While looking into relations I noticed I could create a separate tab in the entry that would house the table which I had as a standalone entry previously. That way I was able to set all of the coordinate pairs as default values in the table with a lightswitch to toggle them on or off. This way you can now create a new entry and select which marker you want on. Now the issue I am having is passing the row.latitude and longitude values from the entry template to my js script to place the marker on the map on the home page. Thank you again!
Gideon B
<craft3><entry><craft-features><entry-type><channels>
Create a New Entry with Fields Populated from an Existing Entry Table
# Create a New Entry with Fields Populated from an Existing Entry Table

(Asked by: username_0 on 2020-09-30)

I am still learning how to work with craft on the back end but so far I can see it is a very powerful platform!

I was wondering if there is a way that within an existing entry channel say "foo" I have an entry comprised of a table made up of multiple numerical values under specific headings (say column A has a value of 1, B:2, C:3,..Z:X)- I was wondering if there is any way that I can grab the values in columns A:1 and B:2 from the table entry in channel "foo" and create a new entry under a different existing channel "bar" where those two values A:1 and B:2 are pre-filled in the new entry type form?

Apologies if this is confusing- I am attempting to eliminate the steps involved in copying values from one entry type (large table of values) to another entry type (a form made up of fields that make up content on the front end of the site) and consolidate it into one step where I can find the row containing the values I need in channel "foo" and just click to create a new entry type with those values pre-populated in channel "bar"- eliminating the need to copy and paste the values.

I am not sure how to tackle this or where to begin as I am still new with the platform.

Thank you in advance for any help!

**Tags:** craft3, entry, craft-features, entry-type, channels
> **Comments:**
> **username_1**: Hey! This is an interesting question. Are you able to share a little more context? There might be an alternative way to achieve what you're asking. Are the values for A,B,C etc always going to be the same?  
> **username_0**: @dmatthams Yes! I have a Channel "foo" which contains an entry-"Entry 1" and "Entry 1" contains a table with lets say 4 columns - A,B,C,D. The table has the values pre-inserted for A,B,C,D in the rows. Currently, if I want the values from columns C and D inserted into a new Entry under channel "bar" I have to go in and find the row which corresponds to the data I want and individually copy those values from "foo"->"Entry 1" to "bar"->New Entry. Is it possible to create a new entry within a different channel with C & D pre-populated on save, or maybe a lightswitch toggle? Thank you!  
> **username_0**: @dmatthams I am wondering if this is a situation where I would use relations? I guess for clarification, the idea is that I can pre-enter a series of relative latitude and longitude values in an entry table and then, whether through a lightswitch or check I can toggle that pair of values from the longitude or latitude columns to pre-populate into a 'latitude' and 'longitude field in a different entry which is then linked to a marker which displays on a leaflet map on the front end. Or if there is an easier way to do this? Thank you again!  
> **username_1**: Yes I'm wondering if relations would help here. You could potentially have two new sections (or perhaps categories is better suited), one for lat, one for long. All the lat entries could have a relation to the associated long, and vice versa. Then in your "foo" channel you create a relation that allows you to select the lat or long entries. On your front end you can then pull the related lat/long. Does this make sense?  
> **username_0**: Just wanted to let you know but I made some progress. While looking into relations I noticed I could create a separate tab in the entry that would house the table which I had as a standalone entry previously. That way I was able to set all of the coordinate pairs as default values in the table with a lightswitch to toggle them on or off. This way you can now create a new entry and select which marker you want on. Now the issue I am having is passing the row.latitude and longitude values from the entry template to my js script to place the marker on the map on the home page. Thank you again!  

---

## 0 answers

