Creating a Simple 'Flag'

Hey guys,

Anyone have a good suggestion that would have AppSheet check the rows in a table for a value and set a flag if it is found, without using a SELECT() or FILTER() VC or similar? 

Specifically: If the [Notes] column of any row in a table is empty, set the flag so it can be easily seen elsewhere in the app.

For example:

COUNT(SELECT(Table[ID], ISBLANK([Note])))

Using a count works, and all the other tables have to do is check to see if the value is greater than zero.

Unfortunately, in a VC it's expensive, so just asking around to see if anyone has a computationally simpler option? 

Solved Solved
0 3 238
1 ACCEPTED SOLUTION

I see, thanks. In that case what I do is to create references only for the sake of avoiding expensive expressions. 

For example:

  1. In the table where I want to check for blank values:
    • I'd add a VC, name it blankFlag, with the formula:
        IF(ISBLANK([Note]), 1, 0)
    • Then I'd add a new Ref column to each table where I will need to check for blanks in the current table.
        
  2. In the referenced table, I'd show the notification based on this condition for example, or something similar:
      COUNT([Related Records]) > SUM([Related Records][blankFlag])

View solution in original post

3 REPLIES 3

You might need to rethink the way your data is organized. What do you mean by it can be easily seen? You already know whether  you have blank values, why would you put an additional flag? And why you want to set it from other tables? 

I have a 'Menu' page in the app which is held within its own [Menu] table as it has many options:

Qiro_0-1689853315176.png

The little red dot shows up if there's a timecard with an error on it. 

The flag is attached to another table [Timecards], and the Format Rules (notification dot) needs a simple formula to check that flag, and that decides whether to show the notification dot or not.

If I enter a complex formula into the Format Rules it has a detrimental impact on load times.

I see, thanks. In that case what I do is to create references only for the sake of avoiding expensive expressions. 

For example:

  1. In the table where I want to check for blank values:
    • I'd add a VC, name it blankFlag, with the formula:
        IF(ISBLANK([Note]), 1, 0)
    • Then I'd add a new Ref column to each table where I will need to check for blanks in the current table.
        
  2. In the referenced table, I'd show the notification based on this condition for example, or something similar:
      COUNT([Related Records]) > SUM([Related Records][blankFlag])
Top Labels in this Space