USEREMAIL() - select another value

I have an app that populates a field (member of staff) with USEREMAIL() as default when someone is logged in. There are volunteer staff who have work to be accounted for, but do not have logins. 

I want to allow two members of staff to be able to change Member of Staff to a different value (e.g. 'Volunteer'). 

I tried setting the Member of Staff field value to the following formula:

IF(USEREMAIL()="memberofstaff",INPUT("VirtualColumn",USEREMAIL()),USEREMAIL())

"VirtualColumn" is LIST("memberofstaff1","memberofstaff2","volunteer").

Essentially: if the user is Memberofstaff1, let them select if Memberofstaff1 is completing the work or a volunteer from a dropdown menu. If you're not Memberofstaff1, then no dropdown menu for you. 

Member of Staff is a required field. 

When this didn't work as a formula in the app I tried creating an action where Memberofstaff1 and Memberofstaff2 could only see the button to set Member of Staff to 'Volunteer'. 

Appsheet didn't like that either, telling me that Member of Staff was a required field.

I think this should be an easy solution but i'm struggling to see where i'm going wrong.

Solved Solved
0 2 162
1 ACCEPTED SOLUTION

Hello, as far as I know, USEREMAIL() is an Appsheet expression that returns the email with which the person has logged in. This makes me think that your expression is not going to work since the condition will never be equal to what you ask for:

USEREMAIL()="memberofstaff"

This will not happen, because the email with which the person logged in is different from the email that you can put in a members table. I mean, the member who has entered the application has logged in with an email, different from his user email in the user table.

For appsheet, a user is a USEREMAIL(), I understand, tell me if I'm wrong, would you help me too. Greetings

 

View solution in original post

2 REPLIES 2

Hello, as far as I know, USEREMAIL() is an Appsheet expression that returns the email with which the person has logged in. This makes me think that your expression is not going to work since the condition will never be equal to what you ask for:

USEREMAIL()="memberofstaff"

This will not happen, because the email with which the person logged in is different from the email that you can put in a members table. I mean, the member who has entered the application has logged in with an email, different from his user email in the user table.

For appsheet, a user is a USEREMAIL(), I understand, tell me if I'm wrong, would you help me too. Greetings

 

Thanks Gustavo; i'd suspected as much but wondered if someone had found a workaround.

Top Labels in this Space