You are viewing limited content. For full access, please sign in.

Question

Question

Populate data to drop-down from data-source with separate option and value

asked on October 30, 2019

Our company just setup LF and I am trying to prepare some Forms as a prototype.

I want to populate a key-value data from the database to a drop-down, such that the drop-down will display the "key", while it will store "value" to the forms for further processing. 

After some study, I wonder if it is still not possible to do it in a straight forward way?  (such as create another look-up rule)

Thanks

0 0

Answer

SELECTED ANSWER
replied on October 31, 2019

The best way would be to use 2 Lookup Rules, as you've suggested, but also create a hidden field to hold the "Value" data (it sounds like you don't want to see the "Value" initially, but you want it to be available for use at a later point in the process).

Your first Lookup Rule will be to populate the "Key" drop-down with the "Key" values in the database (with no conditions). Your second lookup rule will have the condition that when the "Key" drop-down selection matches a key in the "Key" database table, then store the corresponding database "Value" in the "Value" field on the Form (which is a single-line field).

You can then configure a Field Rule to hide the "Value" field "Always" but "Save the data when the field is hidden". This way, the field is never seen on the Form by users, but the data is saved as a variable that you can reference later.

I think this may be what you need. I've included screenshots below of my Lookup Rules and Field Rules setup when testing:

 

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.