Select Statement in Security Filter

Hello Community, 

In order to speed up sync time, I transitioned the table over to a relational database and filtered through the security filter. I read by using the expression, [Service Days] = Monday, it will still fetch all the records and then retain the filtered records. VS if the I sent the database a query:  SELECT * from MyTable where [Service Days] = Tuesday. This expression would return the x number of records.

 

Per the documentation:

'Obviously, the second approach is much more efficient. Database systems have techniques like indexing that can run such queries quickly.'

 

I tried creating a Select statement that would return only those records that match the service day filtered but am having no success. Any help with the syntax is greatly appreciated.

The expression I need help tr

SELECT(*)

FROM SC Parcel

WHERE [Service Days] = Tuesday

 

 

Solved Solved
0 4 175
1 ACCEPTED SOLUTION

You are mis-interpreting the documentation. To quote the following linked doc "When security filters are used with database sources, there is the potential for the system to convert the security filter into a database query."

https://help.appsheet.com/en/articles/975990-scaling-using-security-filters

To re-state that, Appsheet itself will take your Appsheet expression, and convert it into a database query, which it will then use to retrieve the data. You, as the app builder, are not writing any database queries yourself anywhere.

[Service Days] = "Tuesday" is a fine Security Filter expression by itself. If you're using a SQL database, Appsheet will convert that into

SELECT ...... WHERE `Service Days`="Tuesday"

View solution in original post

4 REPLIES 4

You are mis-interpreting the documentation. To quote the following linked doc "When security filters are used with database sources, there is the potential for the system to convert the security filter into a database query."

https://help.appsheet.com/en/articles/975990-scaling-using-security-filters

To re-state that, Appsheet itself will take your Appsheet expression, and convert it into a database query, which it will then use to retrieve the data. You, as the app builder, are not writing any database queries yourself anywhere.

[Service Days] = "Tuesday" is a fine Security Filter expression by itself. If you're using a SQL database, Appsheet will convert that into

SELECT ...... WHERE `Service Days`="Tuesday"

Thank you for the clarification sir! Makes more sense. 

Hi @Marc_Dillon , After applying the security filter on SQL Database , appsheet only consider the data which is only in Security filter but I want to consider whole data for a particular column wherein duplicates shall be ignored, please help...

It worked fine with G Sheet ( as duplicity is considered) but in SQL database it is not considering

Don't really know how you expect me to help. Of course it can't consider data that your Security Filter prevented from being loaded.

Top Labels in this Space