Using ShowIf function to seperate User pages

OK Interesting problem.

My app is a score tracking app. Functionally everything is working perfectly.
With this app each user has the ability enter a score independently of the next user. This is also true for their own score entries to be viewed in a table. The idea is that when they are in the app, they do not have to select who they are to submit. just enter and save, done deal.

I do this by creating a user Entry page for every user. Then using the โ€œShowifโ€ function with the formula CONTAINS(USEREMAIL().abc@gmail.com) the only user that can see that particular Entry page is whom ever with the "abc@gmail.com" email address. This works wonderfully if Iโ€™m never changing users.

I have setup an admin portion to the app which allows me to assign Users Name to a unique entry page. What I need now, is a formula for the Showif function to look up the name assigned or rather the email assigned in my table for that User to view and use the Entry page.

Believe Iโ€™ll need to run a LOOKUP command to find the specific table. Then tell it if it CONTAINS the USEREMAIL in that particular Row of the table.
In a Spreadsheet I can figure this out, with the appsheet Expressions on the other handโ€ฆ Playing a lot of guess work.

Anybody able to help with this?

0 3 2,029
3 REPLIES 3

Steve
Platinum 4
Platinum 4
USEREMAIL() = LOOKUP(
 "Entry Page Name",
 "Entry Page Table",
 "Page Name",
 "User Email"
)

where:

  • Entry Page Name is the name of the page youโ€™re checking access for.

  • Entry Page Table is the name of the table containing your access information.

  • Page Name is the name of the column in that table that contains the page name. LOOKUP() will attempt to find Entry Page Name in this column.

  • User Email is the name of the column, also in the same table, that contains the email of the user allowed to access the page named in the Page Name column of the same row. If LOOKUP() finds Entry Page Name in the Page Name column, it will return the value of the User Email column of the same row.

So LOOKUP() finds the email address attached to a given page, then you just have to compare that result with the appโ€™s current user (USEREMAIL()) to determine if the current user is the one allowed to see the page.

Ok, Let see here

โ€œEntry Page Nameโ€ If I understand you correctly, this will be the sheet that is used for the entries. which would be โ€œAngler 1โ€ in this case.
โ€œEntry Page Tableโ€ This should be a Sheet named โ€œAnglersโ€

here is a screen shot of the table iโ€™m using. This sheet is the โ€œAnglersโ€ Sheet (blocked out the names and emails on purpose)
1X_64d8fc8eeb4313c55c185c17e3d1b1b08df5bd82.png

So if iโ€™m following correctly, my Formula should look like this?
USEREMAIL() = LOOKUP(โ€œAngler 1โ€, โ€œAnglersโ€, โ€œAngler Numberโ€, โ€œEmailsโ€)

Just confirmed it works!

Thanks a bunch

Top Labels in this Space