IMMEDIATE ATTENTION - FILTER TABLE - MULTI USER ISSUE

Dear friends,

                     I am working for an event management company which has the participants database and search method is through phone number (mostly attendance app). this app will be accessed by multiple counters to handle crowd. 

Note : This app should be completed within today or else it will be big problem because event is on tomorrow.

jaichith_4-1696995205156.png

 

I am struck with an issue which is related to filter table. , I have a database table name called SANGAMAM and it has a slice  with the name FILTER 2 with the row condition 

IF(ISNOTBLANK(FILTER[PHONE NUMBER]),IN([PHONE NUMBER], FILTER[PHONE NUMBER]),TRUE)

SANGAMAN DATABASE

jaichith_1-1696994097689.png

 

FILTER SLICE

jaichith_0-1696994057558.png

 

I have table which is used for getting filter UX and it has UPDATES ONLY as permission and it has a single entry.

jaichith_2-1696994239587.png

jaichith_3-1696994742239.png

 

 

Problem :

Since Filter method works on UPDATES ONLY with single entry, whenever there are multiple user who are accessing to filter table they are getting values based on the latest user input. This makes malfunction (not as expected)  in finding by using phone number.  

Need : 

There can be multiple users but, they should get their own filter results not the latest updated result by any one of the user.  

Note : We don't want to use search option which is in the top of deck and table view. 

App reference used to create this app. 

ADVANCED Filter : https://www.appsheet.com/templates/Advanced-Filtering-per-User?appGuidString=cfdbb8ab-5417-4145-be99...

FILTER DASHBOARD by JOE : https://www.youtube.com/watch?v=uDvbgDeFsYE

Enhanced Dashboard by @MultiTech : https://www.youtube.com/watch?v=HWhtlzxtPss

Please Help 

@AleksiAlkio @Marc_Dillon @Suvrutt_Gurjar @jyothis_m  @WillowMobileSys @MultiTech @TeeSee1

@Tommy62 @SkrOYC @Aurelien  

 

 

 

Solved Solved
0 23 653
1 ACCEPTED SOLUTION


1. So When this bot should run ? Any idea about this? When a new user is added to user table ? 

On user creation, add a new row to the filter table

2. Can I make email id as key for the filter table sir?


No, just filtering the table with the security filter as explained earlier.

3. Can I add one more step ?  If a user is deleted from user table then bot will remove respective user email id from filter table


Same process then 1st one. The event will be on "delete only". Please check the "bypass security filter" option on the event for ALL of your bots.

Aurelien_0-1697177970081.png

 

View solution in original post

23 REPLIES 23

Aurelien
Google Developer Expert
Google Developer Expert

Hi @jaichith 

Your issue is problbaly related to the Quick Sync option being enabled.

You can:

- disable Quick Sync option on your app

Aurelien_1-1696996231755.png

OR you can:

- add an additional column [useremail]

Aurelien_0-1696996124400.png

- use Security Filters on your table with this condition:

 

USEREMAIL()=[useremail]

 

- use a bot to create as many rows a you have users

Hope this helps 🙂

bro, then what will be the row filter condition for the slice ?

does the bot will not make it slow the process ?


@jaichith wrote:

Since Filter method works on UPDATES ONLY with single entry, whenever there are multiple user who are accessing to filter table they are getting values based on the latest user input. This makes malfunction (not as expected)  in finding by using phone number.  


 

It sounds that you have only one row for storing the filter setting of all the users in your FILTER table.

If so, in general, I believe you will need to have a filter value that is each user based. So you may need to include a users' table with one record for each user. Then the filter values of each user can be stored in each user's record. So the filter setting of different user's will not conflict with each other.

It sounds that you are under time pressure. But please be aware that community can give some general guidance or suggestions based on your description.  Please evaluate thoroughly at your end before proceeding The community may not be always available to answer your follow up queries.

Side note: As a good naming convention for various app component, one may not have the names of the app elements ( tables, slices, views, actions etc) that are same as function names. 

So one may avoid table, slice names such as SELECT, FILTER, BLANK etc.

This is so because In the expression you have shared 

IF(ISNOTBLANK(FILTER[PHONE NUMBER]),IN([PHONE NUMBER], FILTER[PHONE NUMBER]),TRUE)

it is extremely confusing to make out what FILTER stands for. One wonders if it is AppSheet function or table name.

 I would name filter table as say User_Selection or Phone_no_Selection

I am sorry for poor naming methods. In future I will correct it. 

I will try to deploy what you and @Aurelien  sir has suggested. 

If you have any other most practiced or general method which is used for filtering . Please say sir. 


@Aurelien wrote:

- add an additional column [useremail]


Hi @Aurelien ,

I saw that you have already guided on the same lines to create a user based filter. Sorry that I missed your response as I was typing in my rather long response.🙂

No problem @Suvrutt_Gurjar .

As always, your answers are neat, exhaustive, and well documented.

I appreciate this part:


@Suvrutt_Gurjar wrote:

But please be aware that community can give some general guidance or suggestions based on your description.  Please evaluate thoroughly at your end before proceeding The community may not be always available to answer your follow up queries.


🙂


@jaichith wrote:

bro, then what will be the row filter condition for the slice ?


Don't change anything expect my suggestion.


@jaichith wrote:

does the bot will not make it slow the process ?


There is no bot involved in your filtering mechanism. The bot will only be used once to create one row per user in the filter table: once the row is created, it should not be ran again. To prevent any duplication, I would suggest using a condition such as:

NOT(IN(USEREMAIL(), FILTERTABLE[useremail])

 

1. So When this bot should run ? Any idea about this? When a new user is added to user table ? 

2. Can I make email id as key for the filter table sir?

3. Can I add one more step ?  If a user is deleted from user table then bot will remove respective user email id from filter table

 


1. So When this bot should run ? Any idea about this? When a new user is added to user table ? 

On user creation, add a new row to the filter table

2. Can I make email id as key for the filter table sir?


No, just filtering the table with the security filter as explained earlier.

3. Can I add one more step ?  If a user is deleted from user table then bot will remove respective user email id from filter table


Same process then 1st one. The event will be on "delete only". Please check the "bypass security filter" option on the event for ALL of your bots.

Aurelien_0-1697177970081.png

 

I need your help again. 

I have created 2 bots 

Bot 1 - when new user is added to the user table then for that user a separate email id is added in the filter dashboard table.  ---- Works perfectly.

Bot 2 - When a user is deleted from the user table, email id and its entire row should be deleted from filter dashboard table. ( I don't know how to create an action and to configure the bot )

Kindly help me bot 2 

@Aurelien @AleksiAlkio @Suvrutt_Gurjar 


@jaichith wrote:

Bot 2 - When a user is deleted from the user table, email id and its entire row should be deleted from filter dashboard table. ( I don't know how to create an action and to configure the bot )


 

What about creating an app that will run periodically against the filter table, and using this condition:

NOT(IN([useremail],userTable[email]))

 

Schedule settings need core plan. My clients will not have such premium plans

And what about "on delete"?

We have implemented instructions given by you @Aurelien  and @Suvrutt_Gurjar , @AleksiAlkio 

Click to see the Thread 

@Aurelien @Suvrutt_Gurjar 

Thanks both of you. I could get some idea. Usually how does the  filter methods is approached ? Is the way you specified ? Or any other way ?Because we could see there are many applications and softwares are having filter table. Which will have multiple users at same time. 

Even appsheet has at the top "Search" 


@jaichith wrote:

Because we could see there are many applications and softwares are having filter table. Which will have multiple users at same time


It was probably before Quick Sync feature was made available 🙂

When using AppSheet's search functionality, the filtering is happening on the client side, where your approach is happening on the backend / data source as you are saving the search data. That's why you need to use Suvrutt's approach where each app user have their own row and you need to recognize who the app user is either with the email or using Usersettings.

Well explained Aleksi.

Crisp explanation. Do you know any other approach to solve this? 

The logic is wrong, not the app.

So no other way for me ? 

What's wrong with Suvrutt's approach?

I am going implement what suvrutt sir said. If you know any other methods I thought it will be helpful to me ....

Aurelien
Google Developer Expert
Google Developer Expert

@jaichith 

Here are the steps to follow, step by step:


@Aurelien wrote:

OR you can:

- add an additional column [useremail]

Aurelien_0-1696996124400.png

- use Security Filters on your table with this condition:

 

USEREMAIL()=[useremail]

 

- use a bot to create as many rows a you have users


 


@Aurelien wrote:

1. So When this bot should run ? Any idea about this? When a new user is added to user table ? 

On user creation, add a new row to the filter table

2. Can I make email id as key for the filter table sir?


No, just filtering the table with the security filter as explained earlier.

3. Can I add one more step ?  If a user is deleted from user table then bot will remove respective user email id from filter table


Same process then 1st one. The event will be on "delete only". Please check the "bypass security filter" option on the event for ALL of your bots.

Aurelien_0-1697177970081.png


 

Please note the "delete" part is unnecessary from my perspective.

Top Labels in this Space