add primary action in table view to sync tables

I thought I was on my way to a solution until I stumbled upon some AS limitations (like primary action buttons in a table view, etc)- so let me spell out my desire to see if there any suggested solutions:

My data will consist of 2 tables which ideally will always match in number of rows (with the key value of the rows being the same). Table 1 is generated externally to AS/GS and will either be manually imported into GS from time to time or someday, Odata linking> MySQL or something similar may be built (let's stick with manual for this exercise).

The goal is for an admin person to be able to manually (because trying to do so automagically is unnecessary overhead for the expected/anticipated amount of time the data may possibly change) "sync" to ensure that when new rows are added in Table 1 (again, not from within AS or even GS), corresponding rows are created in Table 2. 

My plan was to use Data: execute an action on a set of rows to evaluate (row by row) to see if the Table 1 row exists in Table 2 and if not, create it. I believe this is similar to what @Gustavo_Eduardo is asking in this post, but I figured I should ask here just the same to ensure I am not missing an easier way to accomplish my objective.

jharkless_0-1740032685043.png

 

Solved Solved
1 4 125
1 ACCEPTED SOLUTION

Ok, I got an automation to work (needing multiple actions, etc), but I needed to create a dummy table which shows me a comparison count between the raw data (table 1) and the merged data (table 2).

This all feels unnecessary if a Table could simply support a table wide (non-row level) action.

jharkless_0-1741573910435.png

 

View solution in original post

4 REPLIES 4

Sorry for my ignorance, but I believe that what happens in our apps when we sync is that our interface displays what's happening in the database, and in doing so, it reads everything in the database.

The synchronization time is longer or shorter depending on the calculations that need to be performed and the data that needs to be read. If you have many complex virtual columns, syncing will probably take a long time.

The decision to sync manually or every time a record is added (unfortunately, for now) is black or white. There's no option to sync one table automatically and another manually. I've submitted this as a feature request, but as you know, that section is a gold mine that Google has yet to discover. Look at the image below in the performance section of the editor. If you turn off "Delayed Sync" everything will automatically sync, but if you leave it as it is in the image, you will need to manually change it.

Captura de pantalla 2025-02-20 085227.png

Regarding main buttons, I've created a post, maybe it will be useful to you.

Appsheet does not currently allow main actions on a table (unless they are application actions such as going to a form view). What I do in this tip is to first send the user to a form. In reality, it is not necessary to create an additional table (you could do it with a table you already have) but the idea is to go through a form first (it is annoying but there are no other options).

 

 

Steve
Platinum 5
Platinum 5

This strikes me as better suited to Automation:

  • When a row is added to or updated in table 1 that doesn't exist in table 2, add the row to table 2.
  • When a row is updated in table 1 that does exist in table 2, update the row to table 2.
  • When a row is deleted from table 1 that exists in table 2, delete the row in table 2.

I don't disagree Steve,- I may need to better understand the order of operations involved with sync with a datasource to MySQL (where we ultimately want to be). If that external table is updated, when is the table in AS reflect it? I figured once a user opens the App, Table 1 is simply now current and it opens with say, 10 more rows than the last time the app was opened, and thus, Table 2 starts by having, in this example, 10 less rows.

Ok, I got an automation to work (needing multiple actions, etc), but I needed to create a dummy table which shows me a comparison count between the raw data (table 1) and the merged data (table 2).

This all feels unnecessary if a Table could simply support a table wide (non-row level) action.

jharkless_0-1741573910435.png