Initial Value for Enum List

Hi,

I have an Enum list that looks up Company Name by useremail and then presents those companies for selection where a user is part of the company. I would like to set an Initial Starting Value so that the field is not blank when the form is opened. It doesnโ€™t matter at this time which value (company) is populated as long as the user belongs to the company which is already accomplished in the Valid If section.

Solved Solved
0 4 1,421
1 ACCEPTED SOLUTION

Yep, your column isnโ€™t an EnumList. Use ANY() instead of TOP():

ANY(SELECT(Users[Company Name], [Email] = UserEmail()))

See also:

View solution in original post

4 REPLIES 4

Steve
Platinum 4
Platinum 4

Make the Initial value an expression that produces a list of values. You could use the exact same formula as you use in Valid If to auto-select all the choices:

SELECT(Users[Company Name], [Email] = UserEmail())

Or, you could preselect the first of the valid choices by wrapping that expression with TOP():

TOP(SELECT(Users[Company Name], [Email] = UserEmail()), 1)

See also:

Hi Steve,

I actually tried this before I posted to the forum but got this error: The expression is valid but its result type โ€˜Listโ€™ is not one of the expected types: Enum.

Am I missing something?

Yep, your column isnโ€™t an EnumList. Use ANY() instead of TOP():

ANY(SELECT(Users[Company Name], [Email] = UserEmail()))

See also:

Perfect! Thank you, Steve.

Top Labels in this Space