Oct 01, 2022 05:06 PM
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?
Solved! Go to Solution.
Oct 02, 2022 05:47 AM
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.
Oct 01, 2022 05:11 PM
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}]
Oct 02, 2022 05:47 AM
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.
Oct 02, 2022 08:23 AM
Great tip about making the templates in the same table. That will definitely make passing object values a lot easier.
Oct 02, 2022 08:38 AM
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.