May 18, 2022 06:15 AM
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”
Solved! Go to Solution.
May 18, 2022 07:38 AM
Ah hmm
Could you replace the following two lines:
'Status': {name: 'Status'},
'Stage': {name: 'Stage'}
with:
'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
May 18, 2022 06:44 AM
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
May 18, 2022 07:14 AM
Thanks so much for your quick reply Adam, I have double checked and cannot seem to find any difference between the two…
Stage
Status
May 18, 2022 07:38 AM
Ah hmm
Could you replace the following two lines:
'Status': {name: 'Status'},
'Stage': {name: 'Stage'}
with:
'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
May 18, 2022 08:10 AM
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
May 18, 2022 08:50 AM
Hahaha glad I could help! Totally been there
Dec 18, 2022 03:45 PM
@TheTimeSavingCo - I tried this solution, and it works for text values. I am struggling to drop in here the recordID of the template record to link the template to the child record. Any ideas how to do that?
Dec 18, 2022 03:46 PM
Dec 20, 2022 07:39 AM
I assume `Task Overview`'s a linked field?
If so, try replacing `{name: c.templateRecordID}` with `[{name: c.templateRecordID}]`