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?
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)
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.
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.
Then when adding a new record:
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
Try this same thing but with Base type Text and your expression on Suggested Values instead of ValidIf
User | Count |
---|---|
18 | |
14 | |
11 | |
7 | |
4 |