Help

Re: Create records for multiple templates - add fields

Solved
Jump to Solution
3239 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Elizabeth_Aucti
6 - Interface Innovator
6 - Interface Innovator

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”
Screen Shot 2022-05-18 at 6.11.11 AM

1 Solution

Accepted Solutions

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

See Solution in Thread

8 Replies 8

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
Screenshot 2022-05-18 at 9.47.29 PM
Screenshot 2022-05-18 at 9.47.34 PM

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…

Stage
Stage - template
Stage - child

Status
Status - template
Status - child

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

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

larissalamaster
4 - Data Explorer
4 - Data Explorer

@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? 


I assume `Task Overview`'s a linked field?

If so, try replacing `{name: c.templateRecordID}` with `[{name: c.templateRecordID}]`