Suggested values for enumlist

Is it possible to make suggested values for an enumlist?

Thx
Bram

Yes. Any expression that returns a LIST can be used.

1 Like

I tried this, without any result:

LIST(
USERSETTINGS(Travailleur de rue 1),
USERSETTINGS(Travailleur de rue 2),
USERSETTINGS(Travailleur de rue 3)
)

Hmm, I’m not familiar with combining those with EnumList. I’ve never used Suggest Values on an EnumList either.

What are those USERSETTINGS supposed to be. And what is the you overall goal of using them as Suggested Values?

What does Test in Expression Assistant display for your expression?

Do your User Settings columns have values?

Do you have any values defined in the EnumList column definition?

Does your EnumList column allow other values?

Does you column have a Valid If expression? If so, might it consider the suggested values invalid?

1 Like

Thx for your reply Steve!

What does Test in Expression Assistant display for your expression?

  • It’s giving the correct list

Do your User Settings columns have values?

  • Email values

Do you have any values defined in the EnumList column definition?

  • I’ve a Valid if: Teammembers[Email]

Does your EnumList column allow other values?

  • yes

Does you column have a Valid If expression? If so, might it consider the suggested values invalid?

  • both ussersettings, Valid if and base type of enumlist are Email

Still not found what I should do …
Do you think I should change one of the above settings?

Thx a lot!
Bram

I found what the problem was!
I’ve deleted the Valid If and now it’s working!

Thx for reflecting on this question!

Bram

1 Like

I was going to say the Valid If is going to override the suggested values.

1 Like

This problem with valid if is related to the discussion here:

I would expect the Valid If expression to remove from the drop-down those User Settings entries that don’t occur in the Email column of the Teammembers table. The Valid If expression effectively says that only values that match are valid; all others are invalid.

Given that the solution you found was to remove the Valid If expression, I infer you aren’t so much interested in controlling what the user inputs but simply want to offer the convenience of providing known addresses. In that case, Suggested values is the better choice, rather than Valid If.

To offer a list of email addresses from Teammembers and include the app user’s own User Settings addresses:

(
  LIST(
    USERSETTINGS("Travailleur de rue 1"),
    USERSETTINGS("Travailleur de rue 2"),
    USERSETTINGS("Travailleur de rue 3")
  )
  + Teammembers[Email]
  - LIST("")
)

- LIS("") removes duplicates and blank entries.

1 Like

Thx for your suggestions.

I wanted to make an enumlist with all the email of the teammembers, where the members mentioned in the usersettings are already ticked.

I tried this first with a valid if expression in combination with a initial value expression, but this did not do the job.

With suggested values it’s working fine: in the way that it gives the wright names to tick!

thx
Bram