A nice challange: I have a column with an en...

A nice challange:

I have a column with an enumlist. In the form you can see the different items shown in buttons. Two items of the list, I would like to restrict them for only one user: so that only that one user can select them.

Is there a way? In edit_if? Show-if?

I’m curious… Thx

Bram

0 5 353
  • UX
5 REPLIES 5

Harry2
New Member

@Diogenes_ASBL_VZW You might want to try using the Valid_If constraint to set the available options in the drop-down based on who the user is (assuming your app requires sign-in so that you can identify the user using

the USEREMAIL() expression). You can read more about how to use Valid_If to populate drop-downs here:

help.appsheet.com - Dropdown from Valid_If

Dropdown from Valid_If help.appsheet.com

Thanks for your reaction @Harry

Valid_if: =select(List Interventions[Interventions], Useremail()=asbldiogenesvzw@hotmail.com)

Is determing if the user can see all the items in the dropdown list [Interventions] or not, depending on Useremail().

What I like to do now is to determine who can see wich item of this list [Interventions]

EG: [Interventions]: {X, Y, Z}

user asbldiogenes@hotmail.com gets a dropdown list {X, Y, Z} But user Bram.socialstreetworker@gmail.com gets only a dropdown list {X,Y} so this last user cannot select or see one of the items of the dropdown list.

Should I make an other column in my table ‘List Interventions[Interventions]’ Where I define wich items of the list can been seen by whom?

Valid_if: =select(List Interventions[Interventions], List Interventions[Useremail]=asbldiogenesvzw@hotmail.com)

But than I only get the items of the list when I’m user asbldiogenesvzw@hotmail.com and as other user I get no items in the list …

Still working on this theme …

You have an idea Dinh?

Thanks a lot, Bram

Harry2
New Member

@Diogenes_ASBL_VZW If you want the drop-down list to be different for different users, I suggest using the IFS or SWITCH expression in the Valid_If constraint to select the appropriate list based on the user’s email. For example, you can try this:

SWITCH(USEREMAIL(), "asbldiogenes@hotmail.com", {X, Y, Z}, "Bram.socialstreetworker@gmail.com", {X, Y}, {X, Y, Z})

You can learn more about the SWITCH and IFS expressions in the article below. Please note that to use the SWITCH expression you must always provide a default result value.

help.appsheet.com - Conditional Expressions Conditional Expressions help.appsheet.com

I thought about the SWITCH formula…it could work fine. You think it’s possible to combine it with a dependent dropdown box?

eg: valid_if= List Interventions[Interventions]

would become SWITCH(USEREMAIL(), "asbldiogenes@hotmail.com",List Interventions[Interventions] , "Bram.socialstreetworker@gmail.com", List Interventions[Interventions], List Interventions[Interventions_Bram])

Where List Interventions[Interventions_Bram] is an extra column with the interventions only for Bram.

Thx a lot, Bram

Harry2
New Member

@Diogenes_ASBL_VZW Hi, any expression the produces a list can be used in a Valid_If constraint to create a dependent drop-down. In this case, since the SWITCH expression always creates a list, it should work fine.

Top Labels in this Space