Does anyone have thoughts on how to use the '...

Does anyone have thoughts on how to use the ‘Show if’ feature in UX Views.

Background. I have an app with a range of views and I am thinking that instead of creating mulitple single-serve apps with custom slices and security filters for the different userbases, I could instead use this show if feature in the UX view I want to limit .

The description states ‘Optional Yes/No formula to decide whether this view should be shown’

What I want do to is write a formula that states if USEREMAIL() is in a column (eg Manager Email Column) then show the view.

Other users USEREMAIL() are in Staff table/Email Column, so would not be in the Manager column, so would not be displayed as a view which is the correct outcome.

Does anyone have a Yes/No formula that complies with this View Show If

feature that go towards accomplishing this? I have watched many of the appsheet tutorial videos but have not seen any that refer to this feature.

I guess some sort of lookup of ManagerEmail = USEREMAIL() but then how to turn it into a Yes/No? As you can see, I’m flailing about on this one.

Any tips would be appreciated.

Thanks

0 6 693
6 REPLIES 6

You could use IN(USEREMAIL(),Managers[Email]). If user’s email address is in Managers table, it gives you TRUE.

@Aleksi_Alkio Thanks for the tip Aleksi. This IN function I have not seen before and worked perfectly to check for a Value in a List.

This could be a useful feature in certain circumstances, removing/reducing the need to create (and later support) multiple usergroup specific sub-apps. Instead just create the slice and UX and limit the view of it to showif condition.

One thing to keep in mind is both slices and Show_If conditions affect presentation but not data. So the data would still be sent to the device and potentially accessible if the user knows how to find it. Security filters provide stronger restrictions because the filtered rows never reach the device.

Hi @Fer_Calvano A couple of days ago,

you had also queried on a “show_if” views based on Users’ Emails. You may wish to

note

@Adam_Stone_AppSheet

's guidance on views in this thread above.

If you do not wish certain data to be sent to certain users’ devices ,the best and most secure option is segregating data by using security filters.

Hope this helps.

is there a way in this example to not show the view to every manager but just managers of the same location as the data. IN(USEREMAIL(),Managers[Email]) but location=manager in location of the lookup manager table.

If a manger is manager at only one possible location:

ISNOTBLANK(
  FILTER(
    "Managers",
    AND(
      ISNOTBLANK([Email]),
      ([Email] = USEREMAIL()),
      ISNOTBLANK([Location]),
      ([Location] = [_THISROW].[Location])
    )
  )
)

Or if multiple possible locations:

ISNOTBLANK(
  FILTER(
    "Managers",
    AND(
      ISNOTBLANK([Email]),
      ([Email] = USEREMAIL()),
      IN([_THISROW].[Location], [Locations])
    )
  )
)
Top Labels in this Space