Using javascript to set field value based on multiple choice value


I am by no means a programmer, but would like to use javascript to set a (yes/no) field value based on a selected option(s) in a multiple choice field. This must happen when the form is submitted, after normal record rules have executed. Is this possible?

For each option selected in the multiple choice field I want to set a Yes/No value in another, matching field.

The reason for this is that I want to create a new connected record (using record rules) for each option selected, but still want to be able to return to the form without creating new records for options previously selected every time the form is submitted. The Yes/No field is to indicate that the record for that option is already created and should not be created again. Please let me know if there is an alternative to javascript.


Hi Garrett, apologies for the late reply. I have tried using conditional values. The problem is that Update rules execute before Insert rules. My insert rule specifies that it should only execute if the "Sent" field is NOT set to a YES value. When I tried using an update rule to change the "Sent" field to a YES value to indicate that the new record has been created, the insert rule wouldn't execute, because the the update rule had already updated the "Sent" field.

Using conditional values has exactly the same effect, as the "Sent" field's value is changed to YES before the Insert rules executes.

I have, however found a workaround using an incremental value.

Thanks for your suggestion.

I may be misunderstanding the question, but you should be able to do this using conditional values. You can set the value of a field automatically depending upon the value of another field.