Simple formula but mismatches on a save

Hi, I hope you can help a newbie to Appsheet.

I have created a simple excel sheet to list a set of players, allow selection of those that turn up on a certain day and then shuffle that subset into a random playing order based on the excel rand() function.

The shuffling works OK using a primary view in Appsheet ordered by the random number which changes on each refresh however if I edit any of the data within Appsheet, it triggers a save which then causes a mismatched formula error and the random number column formula changes in the excel sheet from one that varies by row to a formula that just references the first row.  This means all the random numbers are the same making subsequent shuffles meaningless.  If I edit the data within the spreadsheet there isn't a problem.  

Having read the mismatched formula help I suspect Appsheet is looking at the random number column formula and comparing the 24 rows of formula to the 100k+ rows that are blank and deciding there's a mismatch,  If I can shorten the excel number of rows to match the amount of data rows would this solve the problem (if so next stop the excel forum!)

Am I reading this right?  Is there another way around this?

Hoping you can help

1 2 112
2 REPLIES 2

If I understood your problem well:

- Having formulas in the sheet means that you have to maintain two levels of logic; an added complexity you should rather avoid. So unless absolutely necessary, stay clear from sheet formulas and do the logic at the App level. 

- Changing one column in a row, will cause all the other columns in the same row to calculate. I first thought that this your problem for which there are solutions, but the subsequent phrases about the same values made me confused, so I'm not sure. It will be better that you share with us screenshots of your tables. Thanks!

Hi

Thanks for your response. My problem was this.....

The formula in the spreadsheet
A2=D2-Int(D2)
A3=D3-Int(D3)
A4=D4-Int(D4)
..etc.

If an unrelated field is changed in AppSheet (in my case a yes/no field) it
triggers a save to the sheet which then changes the spreadsheet formula to..
A2=D2-Int(D2)
A2=D2-Int(D2)
A2=D2-Int(D2)
...etc

Anyway I have solved the problem by deleting the app and starting again.
The above behaviour no longer occurs.

I can only think that in developing the first app I changed the spreadsheet
a few times, did a few regenerations and this caused AppSheet to get
confused.

Regards
Mike
Top Labels in this Space