Skip to main content
Solved

Creating a new record in another table for every item in a linked field

  • September 6, 2024
  • 3 replies
  • 42 views

Forum|alt.badge.img+5

I'm working on a tracking system for a coral restoration project. To report coral bleaching to my Bleaching Report table, a user selects a date and all structures where bleaching was observed (linked to my Structures table) like so:

Bleaching Report table:

I would like to add a new record for each structure along with the corresponding date to a different table, like so:

Structure Bleaching table:

I tried setting up an automation which triggers when a new record is created in Bleaching Report to create a new record in Structure Bleaching for every linked item in the Structures field, but it seems only 1 record is being created even when there are multiple structures linked in the field. Here is my automation setup:

The "ID" is selected from the Current item. In the test data for "Repeat for each in Structures", the Input List is returning all the correct structures so I can't figure out why it doesn't iterate over all of them. The record that gets added is correct, but it seems to only add a record for the first structure in the list. If anyone has any insight that would be greatly appreciated! I'm also open to doing this another way in case there might be a better solution

Best answer by TheTimeSavingCo

Hmm, if you're creating records in "Bleaching Report" via a form your automation should work fine I think.  Here's an example of it working fine when triggering it via a checkbox:

Link to base

Could it be that the automation is triggering before all of the "Structures" have been linked up?

3 replies

TheTimeSavingCo
Forum|alt.badge.img+31
  • Brainy
  • 6457 replies
  • Answer
  • September 7, 2024

Hmm, if you're creating records in "Bleaching Report" via a form your automation should work fine I think.  Here's an example of it working fine when triggering it via a checkbox:

Link to base

Could it be that the automation is triggering before all of the "Structures" have been linked up?


Forum|alt.badge.img+5
  • Author
  • New Participant
  • 1 reply
  • September 7, 2024

Hmm, if you're creating records in "Bleaching Report" via a form your automation should work fine I think.  Here's an example of it working fine when triggering it via a checkbox:

Link to base

Could it be that the automation is triggering before all of the "Structures" have been linked up?


Adam, you're completely right, it works with a form! I'm very relieved, thank you!

I'm not sure why it doesn't work with a test trigger, especially since the initial test returns the full list of Structures. But I'm happy the production version works.

I'd also just like to say I've used several of your solutions from other posts in this forum, so thank you for being such a valuable contributor to this community. I've found your posts super helpful and I very much appreciate your work! Thank you for helping me out!


TheTimeSavingCo
Forum|alt.badge.img+31

Adam, you're completely right, it works with a form! I'm very relieved, thank you!

I'm not sure why it doesn't work with a test trigger, especially since the initial test returns the full list of Structures. But I'm happy the production version works.

I'd also just like to say I've used several of your solutions from other posts in this forum, so thank you for being such a valuable contributor to this community. I've found your posts super helpful and I very much appreciate your work! Thank you for helping me out!


Ahh, yeah, when testing repeating groups it only does the first one in the test list I'm afraid.  Thank you very much for saying that and I'm glad it's been helpful!!