Home > Forum > Forms > Choose field mode - add value from source or not

Choose field mode - add value from source or not
0

At Webcon BPS, on the form's list of items, I have a checkbox field and a second field of dropdown(choose) type. The second filed - dropdown field retrieves data from a data base and allows for adding values outside of the database.
The first filed - checkbox field determines whether the value in the second field is from the source or added externally. How can changing the value of the checkbox field affect the behavior mode of the second dropdown(choose) field?

MVP
In reply to: Marcin

I also thought about seceond filed type text to be use without source and show/hide one of field but it not ok idea when we are talking about it in grid - how to in one row hide column and in next show it?:)

I didn't found any way to "merge" a column yet.

If your external data source doesn't use a GUID as id, than you can make use of the fact, that values not part of the database use a GUID as an id. At least this was the case when I last checked it.
So you could check, whether the id is like a GUID and if it's like a GUID and "IsExternal" is false, than display an alert and clear the value using the "Form value changed" trigger. This should also work the other way around.
If the id field of the database is an integer or so you could probably test the Id of the picker field for length and if it contains a - character.

Best regards,
Daniel