Hi, I have an SQL table on an inline collection. I would like to filter the collection if RESOURCENAME is empty or not AND CHECKINDATE is today and save these selections to the User Table. I have the CHECKINDATE part working, but cant figure out how to add RESOURCENAME is empty or not. I was trying to do an If…then in another column (true or false), as RESOURCENAME can be any value, but you cannot filter by the If…Then column, only columns in the SQL table. Any ideas?
Would it help if you added another column to the SQL table solely for filtering in Glide?
Thanks for your reply Eric. Are you suggesting adding another column outside of Glide and then using that for filtering in Glide? Or would this possible just adding another column in Glide and doing some sort of computation?
I don’t have any experience with using SQL. If your resource name and check in date columns are not computed columns, wouldn’t you be able to use them in the collection’s filter itself opposed to doing it with an if-then-else column?
As far as I aware, filtering is only limited for computed columns, not “basic” columns that you import from SQL.
Thanks ThinhDinh. Say I have a table with a RESOURCENAME which contains 100s of rows with some unknown value and other rows without a value. I was hoping I could save some value in the User Table which would give the option to the user to filter the RESOURCENAME by if its empty or not (giving both options). Do you know if this possible? I presume the collection filter would have to be RESOURCENAME includes XXXX, with me working out all the distinct RESOURCENAME values as XXXX and saving this in the user table.
Wouldn’t it be easier to set the filter to check for empty or not empty?
How do you do that as a user option? I can set it to empty or not empty in the design, but I how do you allow the end user to filter by either option?
So you want them to filter by the “Resource name” being empty or not?
As SQL data sources don’t allow filtering by computed columns, I think you can just have:
-
A choice component that writes a choice to a user-specific column (“Has resource” and “Doesn’t have resource”).
-
Show a collection filtered by resource name is not empty, when the user choose “Has resource”, and vice-versa.
Ok, so use the visibility condition to show/hide either collection based on the user-specific column. Thanks, I will give that a go.