Create records for multiple templates - add fields

Hi there, I copied this script from the scripting app. I tried to search in topics already but I am going around in circles and still getting errors.

I want to copy two fields additional fields from my task template to my tasks. The fields are called Status and Stage. The fields are same names in both tables. They are single select. Can someone help.

I added these following lines based on info I could find in topics but I am still receiving “Error: x: Can’t create records: invalid cell value for field ‘Status’. Could not find a choice with that ID or name at main on line 126”

Hm, in the “Status” and “Stage” fields in the child table, do all the same select options exist?

For example, in the screenshots below, the select options that exist in the Stage field of the Template table all exist in the Stage field of the Child table

I believe this error could be occuring as the Stage or Status field of the Child table does not contain options that exist in the same fields in the Template table, and so once the options are created you should be good to go

Thanks so much for your quick reply Adam, I have double checked and cannot seem to find any difference between the two…



Ah hmm

Could you replace the following two lines:

'Status': {name: 'Status'},
'Stage': {name: 'Stage'}


'Status': {name: c.templateStatus},
'Stage': {name: c.templateStage}

And let me know if that helps?

Here’s a base with a script that works for creating child tasks with the single select field option in case my suggestion doesn’t help

Adam, sir, you are a genius, thankkkkkk you! I wish I posted this earlier instead of suffering a minor breakdown trying to work it out! haha

Hahaha glad I could help! Totally been there

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.