Cannot get Custom Select List "On Change" event to work with blank selection

eggroll shared this problem 1 year ago
In Progress

I have a custom select list that is populated by a data master, and the first record in the data master is a blank, so the user has the option of not making a selection. I'm trying to connect an "on change" event to the select menu, but event conditions seem either unable to recognize the blank selection or, if they do, unable to successfully utilize text functions or evaluate the selection as a blank string.


Practical example: show a text box whenever the select list selection is the blank, hide the text box whenever the select list selection is not the blank. Starting out with the blank selected (default value) and the text box visible, the user makes a selection other than the blank and the text box disappears. Good. The user now changes the selection back to the blank, the text box does not reappear. Bad


I've tried every form of event condition I can think of (e.g. checking if the character count of the selection is 0, comparing the selection to a blank string, adding a space to the blank record in the data master but the data master ignores and removes it, checking for a substring that is common to all of the non-blank selections), but to no avail.


Any suggestions to get this to work?


Thanks!

Comments (3)

photo
1

Dear Eggroll,

Sorry for our late response. I have created an example based in what I think you need. Kindly let me know how it goes.

Best,

Sonia Durán

photo
1

Terrific! Thank you, I will take a look.

photo
1

Hi Sonia,


I've taken a look at your solution and it is one I considered, but I considered it my last resort because it checks to see if an actual value has been selected as opposed to if the blank has been selected (aka no selection). This solution is fine if your dropdown list is relatively small. But the larger the list, the more cumbersome this solution becomes as far as creating the event because you have to compare the selected value to every possible selection in your list individually, with the exception of the blank.


Consider, for a common example, a dropdown selector that allows a user, within an address form, to choose a US State. That's 50 items in the list (50+ if you allow for DC or US territories), which means you would need 50 or more "When"/"Else When" conditions. If the dropdown represents countries, you're now looking at close to 200.


So, the simplest solution, if available, is to check if blank/no selection is the value of the dropdown. And it seems being to make such a comparison is currently unavailable.


Looking forward to hearing your thoughts.


Thanks!

Tim