Data to a table isn't saving, no errors.

Hi,

I had a table called Quote Configs. It had a quote config ID column, a quote ID column, and various other config columns.

I had an automation so when a new quote is created, it creates a new quote config. On the new row for quote config, the quote config id and quote id are both set to the same value as the quote ID on the original quote row.

This worked good, however there's another situation in my app where I want to have a project config table, however data in the project table is being imported via an api in a google app script, so I can't use Appsheet to create a new project config row same as I did earlier. (I could do it through app script, but what I did detailed next is much easier)

I came across computed keys and thought this would work great for what im doing. Previously when I first wanted to create the quote config table, before setting up the automation I half went down this route but didn't know about computed keys so I hit a roadblock.

where I am now: I have removed quote config id from the config table, and added a computer key which its formula is [Quote ID]. In google sheets I have the formula on the quote ID column cells is =Quotes!A2, so now for every quote thats in the quote table, there is automatically a quote config in the quote config table. The computed key is calculated from quote id.

Everything so far is great, in app sheet I can view the quote config and its good, all data there, looks good.

My issue is, now when I change data in the quote config form and hit save, wait about 5 seconds or so as usual for the badge on the refresh button to go away, and there has been no change in google sheets. it isn't changing anything. no errors. 

Ive tried to change a bunch of things and experimented for a while now and haven't gotten anywhere, I can't get it to save and update the row in google sheets.

Im really not sure where to go from here or how to work out what's going on.

Any info would be great thanks!

0 6 208
6 REPLIES 6

Hi @clintinthecode 

Have you checked out the documentation on Keys?

https://support.google.com/appsheet/answer/10106672?hl=en

Yes I have, I have no idea why its not saving when updating a row.

The form used to edit the row gets its details by looking up the row based on the key, then when it goes to save it is saving to the row based on that very same key, so it can read but not write. No error is given. I really have no idea how to troubleshoot it or work out why its not working

Steve
Platinum 4
Platinum 4

@clintinthecode wrote:

I have removed quote config id from the config table, and added a computer key which its formula is [Quote ID]. In google sheets I have the formula on the quote ID column cells is =Quotes!A2, so now for every quote thats in the quote table, there is automatically a quote config in the quote config table. The computed key is calculated from quote id.


Please post a screenshot of the worksheet that shows the column used as the app table's key column, and the column that uses the =Quotes!A2 formula (if they're different).

Please also post a screenshot from Data >> Columns in the app editor that includes the table's key column, and the column that maps to the worksheet column with the =Quotes!A2 formula.

Hi Steve, Here is the spreadsheet, and screenshots of the columns view of the table.

From the quote view in my app, I can click on edit quote config, it goes to the quote config form with all the values populated in the form, I change a value and hit save, the reload symbol at the top right of the app has a red 1, after 5-10 seconds like usual it goes away indicating the save was successful, however the value on the spreadsheet hasn't changed.  If I click edit quote config a second time, the value is still the same as I changed it to, but still the old value in the spreadsheet. if I hit the reload button, the app syncs and then is back at the old value.

Screen Shot 2022-08-23 at 12.28.04 pm.png

Screen Shot 2022-08-23 at 12.20.43 pm.png

Screen Shot 2022-08-23 at 12.19.37 pm.png

Screen Shot 2022-08-23 at 12.29.35 pm.png

 

You've got a very convoluted setup. I recommend doing away with the spreadsheet formula to get Quote ID column values for the Quote Configs table and instead populate the Quote ID column from the app.

The reason I did this was so that I don’t need to add a quote config row in the quote config table when adding a quote in the quote table. 

each quote will only ever have one quote confit, they are one for one. 

I know in appsheet for quotes I could make an automation to create a new quote config when I create a quote, but i also have a project config for each project, and projects aren’t created through appsheet so I can’t do that same automation there. Projects are created in my project management software and imported via app script into the spreadsheet. The east way is to just have the quote config id or project config id equal the quote id or project id from the other table, so every quote or project automatically has a quote or project config. This works great in the spreadsheet, however in appsheet, it won’t let me use the quote config id column as the key because that column has a formula. So I then used a computed key to reference the quote config key which for the most part is working except this issue where I can’t save. 

so In my situation I can’t do away with the formula. 

Top Labels in this Space