Visibility condition with numbers and AND with GDOCS isn't working

Hi ! I’m trying to create an app that lets people register to courses, but the courses have limited room.

My App/Pages Support link:

Describe the bug:
The visibility conditions based on a number stored in a column don’t work.

Expected Behaviour:
The first and third courses should be hidden (because they shouldn’t show if the number in the associated column is 4).

How to replicate:
Create a choice with 2 visibility conditions. The first one is checked when a previous choice is clicked on, AND the second one makes sure the choice doesn’t show if the number in the associated column isn’t 4 (the goal is to count inscriptions in a course, by incrementing that number thanks to a formula in google docs. When the number is 4, the inscriptions are closed, and the number doesn’t show anymore).


The conditions are active, but the choice isn’t hidden.

The number equals 4 in the table.

Are you sure that your screen is attached to the first row in that table?
What do you see when you click on the Data View icon at the bottom left?

Also, is there a specific reason why you have this logic in a Google Sheet instead of the Glide Data Editor? The associated sync delay could quite easily lead to a situation where you have overbookings.

1 Like

Hi ! Thank you for your quick answer. Yes, it seems so.

The reason why I use a Google Sheet is because I want to you use Apps Script afterwards to insert an automation system. I want to automate clearing the booking columns every week, because the courses repeat each week.

A few observations.

First you are showing the visibility conditions for the 19:00 to 20:00 time slot, but it’s the 12:30 to 13:30 time slot that has 4. I would like the see the visibility conditions for that component, since that is the one that should not be showing.

Second, your visibility is checking if the count is not 4. What happens if it becomes 5? I think you should be checking for a number that is less than 4 instead of checking if it’s not 4. If it ever becomes 5+, then 100 people could register because every subsequent increment would not be 4.

Third, I agree with @Darren_Murphy. That logic to count the inscriptions should be done in glide with a rollup column. Otherwise, you have too much of a delay waiting for that updated count to sync from the sheet all the way back to the app (a few seconds to a few minutes). That could allow for a greater chance of having too many bookings. You can still use a google sheet for your data and run your automations, but you’ll have a much better user experience if the computations are done in glide.


Hi ! Yes, I clicked on the wrong component, and showed the wrong visibility conditions (the other times slots and have 4 are still showing, though).

I tried using “less or equal to 3” and “less than 4”, but when I try to use those, the component doesn’t show at all, even if the count is less that 3:

You are right about using glide to avoid the delay, but the problem is that the data I want to clear to be able to automate it IS the data I need to count, to make sure there is no overbooking (at least, it’s the only way I came up with…). In my mind, I was going to automate clearing the content of the registration columns each week to “reset” it.

Something isn’t right and I can’t quite put my finger on it. I don’t see any reason why this shouldn’t work, but I think I’m still missing some details about how you have your screen and settings configured.

So it’s apparent that you are using a form container. What I’m suspecting though, is that your visibility conditions are actually looking at values in the new row that hasn’t been submitted yet. It looks to me like your tab is pointing to the inscription table and your form is writing to the inscription table as well, so when you view the data in the at the bottom of the builder, you see the first row, since that is the row that the Tab is attached to, but your form has not created a row yet and the counts are actually blank for the new row being added. What may be happening is that glide is interpreting blank as not less than 4, so the component doesn’t show up. Basically, the way you are trying to set it up is not going to work because the visibility conditions are not looking at the row that you want them to look at.

What I really think you need to do is get those counts into your user profile table. Ideally, the logic would remain in glide, and you use rollups and other functions to get the counts, but if you want to keep it in a google sheet, then I think all you need to do is create Single Value columns in the user table that pulls those counts from the first row of the inscription table and populates is across all user rows. Then you can change your visibility condition to use the counts from the user table instead. User profile values are accessible everywhere in the app as global values. That way, you are pulling the actual values from the first row of the inscription table through the single value in the user table, and your visibility should work as expected.



Hi, thanks for your help ! I’m going to try this right now.

1 Like