Help

Re: Create a new Record and Defining a Multiple Select Field

Solved
Jump to Solution
2047 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Tom_Robertson
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi there,

I am trying to create a script that will create new records in one table based on ‘template’ records from another table, and I’m running into an issue when creating the records with Multiple Select fields. I can successfully use the “creatRecordsAsync” method to create a new record, and can successfully push a string or a boolean to the record. But when I try to create a new record and push a Multiple Select value in, it is erroring out. The string value that I am trying to push in matches the string value of the Multiple Select option in my target table. But I am getting this error when I run the script:

Error: Field “fldntpeWlvbdfgN8Z” cannot accept the provided value.

Any insight? I’m guessing I need to find out the id of the Multiple Select value I’m trying to push somehow?

1 Solution

Accepted Solutions

This will only work if you get the cell value as a string and if the template has only one value in the multi-select. If the template has multiple values in the multi-select field, this will not work.

There are multiple possible reasons why the original method of copying the template value over did not work. One possibility is due to the fact that the template is in a different table. I usually keep my templates in the same table as the final records because it makes maintenance easier—you don’t have to keep fields in two tables in parallel.

See Solution in Thread

4 Replies 4
Tom_Robertson
5 - Automation Enthusiast
5 - Automation Enthusiast

Aaaaaand figured it out about a minute after I posted this. I need to use this format when passing the field value in:

"Field": [{name: value}]

This will only work if you get the cell value as a string and if the template has only one value in the multi-select. If the template has multiple values in the multi-select field, this will not work.

There are multiple possible reasons why the original method of copying the template value over did not work. One possibility is due to the fact that the template is in a different table. I usually keep my templates in the same table as the final records because it makes maintenance easier—you don’t have to keep fields in two tables in parallel.

Great tip about making the templates in the same table. That will definitely make passing object values a lot easier.

Okay, so re-did the automation/script so that the templates are in the same table (denoted with a “template?” checkbox field.) It worked! Much easier as I can just get the field values and not have to worry about which type each field is.