I’ve got a script that I wrote with the scripting block prototype, and it worked perfectly well under that version. Under the new beta, I had to make a few minor tweaks due to API changes, and all appears to be fine except for one part that is being marked as a problem, when it worked just fine previously.
I’m setting a value in a multi-select field using data I’ve extracted elsewhere. The code for the relevant portion that changes the multi-select is pretty bare-bones:
reqtable.updateRecordAsync(reqrecord[0], {"Use": [{name: notes}]});
What’s being highlighted as an error is:
{name: notes}
The notes
variable is a string, and should be one of the five options for the multi-select. Like I said above, this part has always worked in the older block, but in the new one the error popup gives me this:
Type '{ name: string; }' is not assignable to type '{ name: "Silent Auction" | "Live Auction" | "Raffle" | "Other" | "Auction"; }'.
If I replace notes
in the code with a literal string, it’s not marked as a problem, but when it’s a string variable, it is. I’m lost.