Highlight Initial Value in Enumlist Dropdown

Ughh… been fighting this for a while.
So I have an enumlist that the user selects with a dropdown. I have a validif function to limit their selections.

In the initial value I wanted to use a query function to build my initial values. That didn’t work, so I tested by hard coding the initial value to see if that fixes it. When I run “Test” I can see the response for every row is correct, but when I look at the dropdown it doesn’t seem to highlight the initial value. Any ideas?

0 17 256
17 REPLIES 17

Initial Value for an EnumList would have to be a List type value. Such as :

LIST( "a" , "b" )

…or the result of a SELECT or FILTER.

Is that what you’re doing?

ya, that’s what I was doing. Still no love in mudville

In general, your Initial Value and Valid If (or Suggested Values… I love those) should return similar lists.
Initial Value should be all or just some values from the Valid If (or Suggested Values)

Steve
Platinum 4
Platinum 4

Does your Valid If expression produce a list that includes the values provided by your Initial value expression? If not, the unmatched values supplied by Initial value will be removed.

Does your EnumList column Allow other values? If not, and Initial values supplies values that aren’t explicitly defined for the column, the values will be removed.

Might also be worth explaining what you mean by “Highlight initial value in EnumList Dropdown”. When Initial value provide a list of values that match those provided by Valid If, those values are/should be pre-selected in the input field, but not otherwise “highlighted”.

My Valid If expression produced list matches up with the input in my initial value. I tried with a function, and I tried hard coding it in by just writing “SELECTED” but it doesn’t seem to work.

Yes, by highlighted I mean pre-selected.

I’m going to try and build another app and see if I can recreate the problem. Do you think it could be my validif function returning something odd?

You would have to have written

LIST( "SELECTED" )

Part of the issue here is that you’re not showing us what you’re doing (screenshots!).

Yep, tried with list function. No luck there.
Here are some screen shots




That’s your problem I imagine.
3X_a_f_af1924755b2fd6c47337ae804f4d33bc5bea0333.png

Negatron Megatron. I changed it to Text, no change in the app. Should it be something other than text?

Welp, I found the issue. I had a formula in there to allow for editable, and that stopped it from working. Hmm… now I guess I need to figure out how to make that condition work, and still pre-fill the selection

Nope I lied, it worked, then it didn’t work. I erased everything and I just tried to hard code in to see results. See pictures.




I’m at a loss

I’m not sure why you’re having so much trouble either. The setup should be pretty simple. Here it is working on my end.

3X_2_4_243ef1ee3fcf5b9d15b7f09fa73567e28a813ce4.png

3X_1_5_154231af68380eca2f791bd17f5fb5fa9e27f860.png

Then when adding a new record:

3X_f_6_f690f9da95185e0637398e1087020d1b8dc66713.png

Start from the simplest working version, then gradually add on the complexity until something breaks.

It’s really bizarre, I tried copying you and I have nothing prefilled.

So this is in a Details page, and the item is a quick edit field. Do you think that could be it?

Ummm, yep. How are you not already aware of when Initial Values evaluate (only when a record is first created, unless you use reset_on_edit)?

wow, never knew this before. I just thought it functioned the same way. Welp, now I have some pondering to do on how I’m going to do some things with this UX.
Thanks for your help on this

3X_6_7_67ce21f29c7600a2c3c24c0d574366a8678238e0.gif

Try this same thing but with Base type Text and your expression on Suggested Values instead of ValidIf

Top Labels in this Space