Help with Scipting

899 4
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer


Looking for help or to find out if this is actually possible.
I am looking to pull numbers from a row in table A and paste it in table B in one current field. So in other words I want to transpose a row from table A into table B, If that is possible.

Thank you in Advance

4 Replies 4

Hi @Bite2Go
Yes, this is totally possible and there are a few different ways to do it. I would need more information on what you are working with and what you are trying to do to tell you the best way.

If you want to use an automation, you need a trigger event. You can use a checkbox for example. Then you use an Update action to paste the data from the record with the checkbox to what ever other record in airtable you want.

Welcome to the community, @Bite2Go! :grinning_face_with_big_eyes: This is definitely doable, but like @Vivid-Squid said, we’ll need more details.

I’m also curious to know more about the bigger picture behind this request. From a data management standpoint, it’s not always helpful to have the same data in more than one place, so I’m very curious to know what this data copying exercise between tables is designed to accomplish.

Okay bare with me with trying to explain! It can get complicated.

My base is designed to help manage about 37 different schools Inventory for a food pantry type program with a couple components build in to the program such has student choice while keeping anonymously identity of the students.

We have form for each school for them to recruit students via QR code that links to Table A (Data Collecting)

Table A

We are using those numbers to get what each schools minimum of a certain item. For example in the picture above ‘Ferris HS’ has 14 Peanut Butters that they need minimum in there next replenishment order. I want all the Fields in the ‘Ferris HS’ row to paste into Table B.

Table B

Table B (School Backlog) is where the teachers from a certain school, in this case Ferris will update there remaining inventory which gets formulated into a order to replenish there pantries. But for this case I hide all other fields since this is the field I need Table A’s Ferris row numbers to go.

Hope I explained that well enough to get some advice or guidance.

I don’t have a lot of time to dig into this, but my gut impression is that there are some database design issues to be addressed before thinking about scripting anything.

It looks like you’ve got a table (synced from the appearance of it) for schools, which is good. The [School Backlog] table, however, feels like it’s going to repeat data in the primary field; e.g. there will be multiple records with peanut butter in the {Item Name} field. I’m guessing that you might be coming from a spreadsheet background where there aren’t many guidelines for data design, but in a database a key principle is to avoid duplication of data in the primary field of a table.

I recommend making a new table named something like “Products”, where you would have only one record for each product: peanut butter, cheese wedges, etc. Then I recommend making a junction table that would let you link between both of these other tables and track data connected to that relationship.

This junction table would have a field to link to a school, a field to link to a food product from the [Products] table, and then other fields for tracking any data needed about that school and product (e.g. a {Student Qty Min} field, a field that rolls up data from your incoming forms, etc.). The primary field could be a formula that concatenates (combines) the school name and product name; e.g. “Peanut butter at Ferris HS”.

As an example, the first record would link to Ferris HS in the {School} field, link to the peanut butter record in the {Product} field, and then data in the other fields related to peanut butter needs at Ferris HS: current stock, what’s needed, etc. The next record would be for the same school but a different product, and so on. So if you have 30 products, there would be 30 records in this junction table for each school; e.g. 30 for Ferris HS, 30 for Three Springs HS, etc. Then you could create filtered views for each school to isolate the appropriate records and share those views with school reps (if desired). Overall this is a more appropriate design for tracking the relationship between products and schools.