I have a table called “Grants Deadlines”. One of the column is “Grants Submitted” which has REF_ROWS(“Grants Submitted”, “Grant Deadline ID”).
I obviously have a Grants Submitted table, which has a DATE field called “Submitted On”.
All I want to do, and at this point I should be able to, but I am obviously too stupid for this, is this:
I want to add a virtual column to Grants Deadline, which will be TRUE if and only if at least ONE child in Grants Submitted has an EMPTY “Submitted On”.
As a bonus question, I would love a virtual column with the number of children in Grants Submitted where “Submitted On” is empty.
As a bonus, bonus question, I would love even more a virtual column with a LIST with all of the “Grants Submitted” children with “Submitted On” is empty.
I am missing something… big. Please help. I really tried by myself.
Theoretically, that formula should compare the list of records count in your [Submitted On] field with the same list MINUS any blank value (List(“”)). The value for the formula will be TRUE for records that have missing values and FALSE if there are no missing values.
Oh my it worked but… why?!? I really don’t get how that LIST(“”) does anything!
I mean, I am a software developer, and in my head I had to figure out how to take [Grants Submitted], apply a filter with empty dates, and then count the result. This… this really puzzles me.
My next question (for tomorrow) was to figure out how to apply some more advanced filter (checking if any children rows have date pairs that fall into TODAY() ) – I was keen on working this out on my own, but now… what!? Why?!?
I will read through those but… really, in a nutshell, how does that LIST(“”) indicate that SPECIFICALLY the records with [Submitted On] set to empty are actually taken off…?!?
It is mindblowing really isn’t it? I believe the LIST(“”) could be substituted with just LIST() to mean the same thing…an empty list.
Visualising your [Submitted On] column as a list of values, LIST(date,date,date,date,date,date,) then I imagine the empty is referring to the comma separated gaps that occur for the blanks.
I think the list subtraction is a quirk of Appsheet specifically. It would be lovely for some more list manipulation functions like with arrays, but I suppose that would mean breaking things that already work …
I “mind of” get it. Is there a way to play with expressions in a context… Something like a “console” to actually run expressions and see their results?
My Count([Related…]…expression performs the same count twice, does a list subtraction and does a comparison whereas your ISNOTBLANK(FILTER(… expression performs a single query and checks whether the result is blank.
Replace key-column with the name of the key column of the Grants Submitted table.
If you have the third (the list of rows), I’d then use it to produce the second (count of rows), and use the second to produce the first (at least one missing?).
Since a [Related...] is already filtered, using SELECT() with those is more efficient. You just replace the name of the table with the [Related ...] so you end up with a list dereference. Also you don’t need to add another filter condition to make sure you get the rows that are related because they are already filtered…