API Post to appsheet API not showing up right away in QuickSync

Hi, We have an app that is pulling data from another database and pushing it into another table for us so we can use that data in our app. We specifically want it to work this way, but from my understanding, if you have an appscript that is posting data to appsheets API the data should be showing up right away, or at least as soon as the app is synced. In either case, it is not showing up until some time later... 

So I guess my question is, how does quicksync work with data that is pushed to a table via appsheet API? What is the expected timeframe that we should see that data show up? I thought since it was using appsheets API it would take effect very quickly. 

Thanks for any insight. @preethamm do you have any information on how QS and Appsheet API integrate and update? 

2 11 690
11 REPLIES 11

Quick sync supports date changes via API and it should handle it as soon as data is updated by the server. 


@Luke_H wrote:

if you have an appscript that is posting data to appsheets API the data should be showing up right away, or at least as soon as the app is synced. In either case, it is not showing up until some time later... 


Sync not showing updated data indicates that the API is not being called immediately. I would check the AppsScript logs to verify if the script was executed immediately. If that is not the case, I would start a support ticket with details and access to app so that one of us can take a look.

 

 

Thanks for getting back. Yeah, we will open a ticket. Not seeing the kind of response you are stating. The datasource is showing the updated data from the API post but appsheets is not showing the data in the table. 

Just to be clear, this is an appscript that is kicked off by an automation, dips into our on premise database and returns through appsheet "add" API appscript to a table in the app that started the API request. 

I have noticed similar issue. It shows up only after 2-3 manual syncs.

For appscript tasks it shows up immediately in database but it takes 3 syncs to show up in appsheet. @preethamm 

I used ChatGPT to summarize data in a column, and the changes appeared instantly. While another function in the same app script adds line items simultaneously, only the column changes are visible in the appsheet, not the line items.

Here is the video showing the issue- Appscript Sync Delay in appsheet - YouTube 

For more context: I upload a PDF. ChatGPT breakdown and brief the document and returns back the content of Order PDF. The content is then used to add line items if any from document directly to avoid user to add all line items manually. All user have to do is check the line items and confirm if everything good to go. 

Here is the setting of app. 

Screenshot 2023-10-07 at 8.04.56โ€ฏPM.png

Thanks for posting all that and the video. That's exactly what we are seeing. We have tried multiple ways to push data to Appsheet API via app script or pull data via app script and add through Appsheet API. In either cases we are not seeing it until several syncs or randomly at a later time. 

Cool usecase! 

Thanks for the video of the issue. I am taking a look. @Rifad could you please share your test app with me (DM or via support will do)? There are atleast two issues I am noticing here:

- Quick Sync is definitely not working for row adds like @Luke_H and you noticed.

- Sync button seems to just return for the first two tries. 


@preethamm wrote:

Cool usecase! 


Thanks a lot @preethamm 


@preethamm wrote:

- Quick Sync is definitely not working for row adds like @Luke_H and you noticed.


Looks like Quick Sync is only setup for data change not newly added rows. 


@Rifad wrote:

Looks like Quick Sync is only setup for data change not newly added rows. 


Quick Sync picks up adds as well. There are atleast two things happening here that caused the rows to now show up.

- 1. Quick Sync does not update the same screen that added the data. This is mainly because a sync is already in progress when data changes and sync always takes preference. In this video, the line item rows are being added by the automation. I am not 100% sure if the automation ran after the sync or before. If it ran before the sync, then Quick Sync updates for the row would be ignored. 

2. It is likely that that the Line item table does not have unique key configured. AppSheet and quick sync assumes keys are unique. So in this case TID19, TID20 etc are likely duplicates for other Tenders and that would cause the App to detect this conflict and ignore this as an error(I verified this in the logs)

There is still an open question on why the second manual sync did not pick up the new rows. 

My suggestion is to change the key for table with Line items to be both itemId and tenderId. Then reload application on two separate windows and make the change in one window. See if the data updates in the second window automatically. If the second window updated, then it is likely not a Quick Sync issue and issue is Sync is slow. We can investigate Sync timings then. If the second window also did not update, then we have something really odd going on and we need to look into this.

 

I tried everything mentioned above and confirm that its still not working.  Here is more information about the bot below.


@preethamm wrote:

If it ran before the sync, then Quick Sync updates for the row would be ignored. 


All the changes are run in one single appscript only. The bot setup in single task and returns GPT response to appsheet column.

Screenshot 2023-10-10 at 11.39.48โ€ฏPM.png

Here the Return value is working and rows added externally through appscript is not showing up.

Screenshot 2023-10-10 at 11.40.29โ€ฏPM.png

Hey @preethamm 
I'm experiencing persistent issues with the AppSheet API. Specifically, when I try to add new rows, the changes don't appear in the app until I've synced it multiple times. Adding child rows directly via the API seems to work fine after a sync. However, when I add child rows from a different table, like a template table, using the API, they don't appear in the inline rows, even though they're present in the app. Strangely, if I create a separate view for the child table, all changes are visible. It's perplexing why they aren't showing up in the inline rows. 

Last we looked into a similar issue, it was mostly around keys not being unique. Could you please check your Table's schema and see the key column is setup such that every row has a different key value ? AppSheet assumes this is the case and quick sync  cannot distinguish between update/insert if keys are not unique.

If you believe this is not due to key uniqueness, could you please create a support ticket with some details to replicate and appId ? Since slice is showing new data, we could double check if here is some other UI bug.

@Igor fyi

Top Labels in this Space