Home > Forum > Forms > Choice field - state

Choice field - state
0

MVP

Hello,
I'm trying to disable/enable fields based on the state of dropdown (using nr. 3 from this https://docs.webcon.com/docs/2023R2/Studio/Process/Attribute/Choice/Choose_field/#picker):
* Allowing custom values - make fields on form enabled.
* Disabled custom values - make fields on form disabled.

Is there any value which i could use to check state of dropdown control?
In this case i'm using autocomplete dropdown.

I'm using js and global variables right now, but this doesn't work after saving the form with custom values - I'm lacking some control state info.
(I've tried to achieve it with document.querySelector, but without luck).

MVP
In reply to: Daniel Krüger (Cosmo Consult)

Hi Maks,

if the "Allow editing target fields" doesn't help you could check the following:
If I remember correctly "custom values" get a GUID. If your existing values don't use a GUID you could use this.

At least if I understood your question correctly.

Best regards
Daniel

Thanks Daniel,
"Allow editing target fields" almost solves the problem, but I have few fields, which are not targeted, so I have to deal with them manually.

I'll try to go with GUID's, as my dictionary is list of AD users, and ID is AD Login in that case.


@Edit
It seems that if value is not from data source - function doesn't return any id - it's empty (even if there is guid in db), so right now I'm just checking if there is id at all.