Hello,
i often have the same issue regarding workflow: how to set one field dependant on some other field and update that field when 1st field changes.
For (very simplified) example: I have a field with 2 buttons, (letโs say โ1โ and โ2โ) and another field with buttons โAโ and โBโ
I want to achieve the following:
If โ1โ is selected do not show 2nd field and automatically select โAโ
If โ2โ is selected then show 2nd field and allow user to select โAโ or โBโ
i know how to show/hide 2nd โAโ/โBโ buttons and how to use Initial value formula, but the problem is when users choose โ2โ, then โBโ,
then goes back to selecting โ1โ and now 2nd field (โAโ/โBโ buttons) is hidden but it contains โBโ which it shouldnโt if โ1โ is selected.
Iโm solving this with On Save Action and setting 2nd field to โAโ if 1s field contains โ1โ but i wonder if there is any more elegant solution?
Thank you for ideas and best regards,
Peter
Solved! Go to Solution.
Once a value is manually entered into a field during a Form session, Initial Value will stop evaluating. Getting around this in circumstances like yours will just come down to exactly how you want it to work. One suggestion would be make the first column un-editable once a value has been selected in it.
editable_if = ISBLANK( [_THIS] )
Another option might be to have a separate hidden field for the โfinalโ value of the second column that is just calculated by expression, such as:
IF(
[col1] = 1 ,
"A" ,
[col2]
)
Your described Form Save Action is another appropriate option.
Use an app formula; as in:
SWITCH([Column1],
1, "A",
2, "B",
"")
to set the value of the column you wishโฆ and use a show if to hide the 2nd field.
[Column1] = 1
This would set Column2 to โBโ if โ2โ is selected in Column1, however i donโt want that. I want for user to be able to select between โAโ in โBโ (buttons) if โ2โ is selected,.
Once a value is manually entered into a field during a Form session, Initial Value will stop evaluating. Getting around this in circumstances like yours will just come down to exactly how you want it to work. One suggestion would be make the first column un-editable once a value has been selected in it.
editable_if = ISBLANK( [_THIS] )
Another option might be to have a separate hidden field for the โfinalโ value of the second column that is just calculated by expression, such as:
IF(
[col1] = 1 ,
"A" ,
[col2]
)
Your described Form Save Action is another appropriate option.
User | Count |
---|---|
33 | |
30 | |
30 | |
19 | |
17 |