If x Then y Else Do Nothing

I’m not sure if this counts as a bug or a feature request, but it may be causing my app to crash. I have an if then else statement set up as follows:

My hypothesis is that because the Else statement default is to Enter Value, even if nothing is inputted, Glide is autonomously creating new rows to the maximum allowed (500) and filling in these newly created cells with the rule. Glide choosing to create these rows results in a vicious loop, where a trigger of the If Then Else statement creates a new row upon which the statement is run, which creates yet a new row, until all the available rows are used up, since Glide is recognising the rows that it created as being filled. Since this is in an if-then-else statement built in Glide, it does not appear on the Google Sheet. The result is that the Google Sheet suddenly has 500 new rows - and only on the sheet where the If-then-else statement is run from.

I believe, therefore, that the lack of a “Do Nothing” option for the if-then-else statement may be behind this vicious recursion. If my hypothesis is correct, I’d like to check if I can set the Else to Do Nothing rather than to enter an Empty Value. I believe because Glide is entering an Empty Value, the adjacent arrayformulae are populating “blank” content which Glide is counting, triggering a response from the If-then-else statement, which creates yet another row, until the storage is filled.

For reference, I’ve quadruple checked all arrayformulae across all sheets, only the sheet with this if-then-else statement is independently adding 500 rows upon a form submission, all others add only the single new row.

Further testing reveals that it only adds 500 rows if the number of rows available in Google Sheets has been maxed out with form submissions. So if a sheet has 50 rows (reduced because Glide counts arrayformula rows as filled), and the 50th row is filled, instead of creating a 51st row in the Google Sheet, it creates 500 rows once a form is filled. The 500 new rows are only added on the sheet with the If Then Else statement, and on other sheets, only 1 new row is made. But if the sheet with 50 rows has 40 rows filled, then filling the form only fills the 41st row, and no new rows are formed, on any sheet. In both cases, prior to form submission, Glide counts all 50 rows whether they have data or not.

As a result, if I reduce the number of rows in Google Sheet to the minimum, a single form submission will lead to all 500 rows being used and the storage being filled with empty data.

The app is as follows for reference: https://porknado.glideapp.io/

Are you sure you don’t have any other array formulas in your sheet?

Hi Naos,

Thanks for your response. I do have numerous array formulas on the relevant sheet, as well as on all other sheets. Only this sheet has an If Then Else statement, and it is the only one resulting in this problem where 500 new rows are created, whereas other sheets with array formulae only add a single row upon the completion of a form, hence my hypothesis that it may be at issue. None of the array formulae on this sheet are fundamentally different from those on other sheets.

Please show your google sheet

Hi Ran,

Here’s a duplicate of the app and sheet: https://papaglidecomm.glideapp.io/
The affected sheet is called Order Summary.

Still not sure though - is there a “Do Nothing” option for Else?

I could not find the problem
May be I didnt understand you well
Please tell me again what to do
In that cases I usualy use:
=ARRAYFORMULA(IF(ISBLANK (A2:A), “”, “Something…”))

500 lines GIF

Thanks Ran - I’ve made the gif above to demonstrate the problem in action.

Hi Kefa
In my side everything goes well and I dont see any sper rows adjusments

It happens specifically when there are no more extra rows in the “Order Summary” sheet, and glide is forced to make a new row to fill in the new data, but instead makes 500 new ones. If you check the relevant sheet to see that there are no available rows to be filled, and then try it again, you should be able to replicate the results.
The reason I can’t just add extra rows to circumvent this is because of the arrayformulas, which will result in the app counting these unfilled rows, and will further slow down the app (as arrayformulas seem to have a very significant but seemingly unavoidable impact on the speed of the app).

No,it is not the case in my side
I realized that the sheet is very “heavy” and it takes some time to calculate
I have no ideas

Thanks Ran,

What result are you getting when you add an item to the cart when the Order Summary sheet is full?

I don’t know what can be done about the heaviness: it’s partly why I’m trying to limit the number of rows in each sheet to the minimum because vacant rows still go through the arrayformula calculations in addition to being counted by Glide as filled - thus consuming space as well as pace.

Thanks for sharing Ran.

It looks like you haven’t maxed out the number of rows on the sheet as there are still numerous that are empty i.e. rows 33 onward on the Order Summary sheet. Notice that these rows are still counted in the total number of rows in Glide (the count will reduce if you delete these rows). Creating my own buffer by deciding how many additional rows I want to have on the Order Summary sheet below the maximum rows allowed a) delays the inevitable that when the rows max out 500 new rows will be automatically created, and b) means that the speed of the app will be compromised by unnecessarily running calculations on empty rows.

Yes @Jeff_Hager
I think you are right

My indication to that is “Create your profile to complete your order”
It does not go down to the empty rows you mentioned…
Glide did not count the “sper” rows down as you can see in the jpg

1 Like

Hi again @Jeff_Hager - have you any suggestions on speeding up Google sheet calculations / Glide refresh rate? It was already very slow but with the buffer rows as default as Google will keep making them whatever I do, it’s now terribly slow.

You do have very heavy formula usage within your sheet. I would recommend building as much of that functionality withing the glide data editor as possible. Just quickly scanning through your sheet, I think a lot of that could be duplicated withing glide. Maybe not everything but a good chunk of it. If you cna perform those functions within glide, then they are calculated instantly and you don’t have to wait for the formulas in your sheet to recalculate and sync back to glide.

There’s not much you can to speed up the sync process between glide and google. A lot of that is dependent on bandwidth costs to glide (they can’t check and resync your sheet every second), and whenever google pushes updates to to glide (could be up to a few minutes).

I have run into the same issues, but with less concern for me about the time it takes for the formula’s to calculate and resync. Now I am currently in the process of going through my year old project and converting many of the formulas in my sheet to use the newer built in functionality within glide.