Hi - I have a newbie question here. I am writing a script with the script block to write a value into a single select field but I keep bashing my head against the wall. Can someone give me some guidance?
Here’s the short and skinny:
If I use the below, it all works, because the “ZIP CODE” field is of type “single line text”. I can write “12345” into it all day long.
let newPreference = "12345";
// update the notes history value and reset the notes value
VoterTable.updateRecordAsync(record, {
"ZIP CODE": newPreference
})
However, in the below, the “PARTY” field is of type “single-select”. One of the options is “Green” but I cannot write “Green” into the field at all. In fact, I cannot write ANY of the options into the field at all. I tried prepending the ordinal value as “11Green” and “11|Green” (Green is the 11th value) and nothing works. Every time I run this, nothing happens.
let newPreference = "Green";
// update the notes history value and reset the notes value
VoterTable.updateRecordAsync(record, {
"PARTY": newPreference
})
Any help for a newbie is appreciated … thanks.
