Quick Sync and Security Filters expressions compatibility

Aurelien
Google Developer Expert
Google Developer Expert

You may have experienced using the Quick Sync feature and seeing it disabled when saving your changes in the app editor.

This is because Quick Sync can work only with the most simple Security filters expressions.

I ran a serie of tests to push the limit as further as possible.

Here is (by  now) which expressions work, and which expression do not.

I may update this post in the future according to AppSheet team's great achievements ๐Ÿค“

Security filter expressions compatible with the use of Quick Sync

OR() with USEREMAIL() and USERROLE() :

 

OR(
  USEREMAIL()=[email],
  USERROLE()="Admin"
  )

 

OR()  simple with two columns

 

OR(
  [email]=USEREMAIL(),
  [role]="Admin"
  )

 

OR() with two values

 

OR(
  USEREMAIL()=[key],
  USEREMAIL()="t@t.t"
  )

 

OR() and AND() nested

 

OR(
  USEREMAIL()=[key],
  AND(
    USERROLE()="Admin",
    USEREMAIL()="t@t.t"
  )
)

 

CONTAINS simple:

 

CONTAINS(USEREMAIL(),[key])

 

IN simple

 

IN([email],
LIST("a@a.a","b@b.b")
)

 

Security filter expressions which cause Quick Sync to be disabled

- LOOKUP() expressions

- SELECT() expressions

- Dereference expressions, such as:

 

[user].[role]="admin"

 

EDIT

Updating with @MMMiles 's contribution - thanks !

7 8 576
8 REPLIES 8

Thank you @Aurelien for a nice, neat list of what security filter expressions work and what not with quick sync.

Usersettings("column_name") can also be used with Quick Sync.

 

So you mean that Security filters will or may not work and data would be exposed when expressions like select(), lookup () are used? 

@jaichith Security Filters will work, but Quick Sync will be automatically disabled.

 


@Aurelien wrote:

Security filter expressions which fail with Quick Sync


I think you meant "expressions which cause Quick Sync to be disabled". 

Because I rely on Quick Sync, and have a small organization, my method for using security filters is to store useremails in a column of the table I want to filter.

IN(USEREMAIL(),[security_filter_email_allowed])

The user emails are exposed, which is acceptable in my case, but this was the only (simple) approach I found that works within the constraints of Quick Sync.

If USERROLE() (and user management) were expanded Quick Sync and Security Filters would be more powerful.

Aurelien
Google Developer Expert
Google Developer Expert

@MMMiles Thank you for your insight.


@MMMiles wrote:

Usersettings("column_name") can also be used with Quick Sync.


I just gave it a try with a simple expression such as:

USERSETTINGS("Role")="role1"


and also:

USERSETTINGS("yes_no_column")

It leads to the Quick sync being disabled on my side.

Do you confirm it works with your app?

I have tried to be thorough, and it is working for me. I have tested in emulator and outside of emulator with 2 different users in 2 chrome instances. Shared table, access mode = as app creator, updates = CRUD, source = google sheet.

In my case I was filtering by User Settings via

IN(USERSETTINGS("Current_Selected_User"),[ref_user_id_security_filter_access])

where [ref_user_id_security_filter_access] is an enumlist of ref to user_id, and USERSETTINGS("Current_Selected_User") is ref to user_id.

And also tested a simple yes/no as you suggested

USERSETTINGS("yes_no_column")

QuickSync has stayed enabled, filtering working as intended and QuickSync functionality confirmed working between 2 browsers, logged in to separate users.

If there are other parameters I can change, or something else I can test, please let me know. 

Aurelien
Google Developer Expert
Google Developer Expert

I still can't make it behave like yours.

Maybe someone from AppSheet can help into clarifying this difference of behavior?

@Arthur_Rallu @preethamm 

Top Labels in this Space