I have a working dependant drop down using Data Validity rules that is 4 levels deep after the 3rd the last one is only 1 selection and you have to click it to select it.
The value is filled in but not selected I am trying to automatically select it. So I think I need to set the initial value based on the 3rd selection. Or is there a setting to automatically select if there is only one value in a dropdown.
the 4 columns are Region, Division, Location Name, Branch
so for each column in the Data Validity> Valid If you put Table[Column] with its own column
so In the Region column I have LocationMaster[Region],
in the Division column I have LocationMaster[Division],
in the Location Name column I have LocationMaster[Location Name],
in the Branch column I have LocationMaster[Branch]
When you go to that form only the Region dropdown shows until you choose a value then the Division shows, then the Location Name shows, then the Branch is a button I have to click to select, this is the thing I want to change. I would like it to be autoselected since it has been filtered down to 1 value.
Use your SELECT statement in place of “branch selection”. The ANY() statement returns the value instead of the row. Normally, it returns the top value of the list but the list could be in any order. since you KNOW there is only 1 row then it will return the value you want.
I can make the dependent drop downs work with that - but it still has the same problem he value is not selected unless I click it.
I just need a switch that says show and select the value
so maybe you could do MyTable[ColumnD].autoselect and it would not only show, but show and select the first value.
Given your expectation there will only ever be one result from that expression, you can extract the first and only item from that List result by wrapping it in ANY():
You can then make this the Initial value expression for the column. No Valid If expression needed. You may want to set the column’s Editable? property to the expression FALSE to prevent the user from changing the auto-selected value.