This text has been translated from Japanese into English by a translation tool.
Please excuse any difficulties in reading it.
1.The following parent-child relationship tables exist
2.Create the following actions.
3. Group actions work correctly when executed in batch processing from the editor screen.
4.However, the following error occurs when group actions are performed in batch processing from desktop mode.
Due to this error, it is possible to set value to a child table, but not to add it to the parent table.
You need to add another key column to the "parent" table. You cannot use the "PID_datatime" column as key.
It is quite difficult to explain this case, but in the aforementioned example, a column of Datetime type is used as the key of the parent table to simplify the story, but this can also be a text type, for example.
Here, instead of the usual order as follows,
➔ Create parent record ➔ Create child record
The opposite.
Create Child Record➔Create Parent Record.
This procedure works well when the desktop mode of the preview version is switched off, and when the desktop mode of the preview version is switched on, the aforementioned error occurs.
Hopefully, you can try the aforementioned procedure in your own environment and see how it behaves when desktop mode is switched on and off.
I consider this to be a bug...
It is not about the type of the column. Key column values should be unique; that is you cannot have two rows in the same table having the same key.
You cannot use the "PID_datatime" as key, NOT because it is of Datetime type, but because you cannot guarantee having unique values for each row, which is what we are having in your case.
Please also note that the Editor's "Preview" is not meant to replace using the app as a user; it just gives you as its name suggests: a *preview*. Instead, you should really test the app as a user. Doing so, I highly suspect that the app would allow you to store two rows in the same table with the same key, regardless of your chosen interface, mobile or desktop.
I understand of course that
・Key column values should be unique; that is you cannot have two rows in the same table having the same key.
・That the preview version is just that, a preview version.
Especially with regard to 'Key column values should be unique', because I understand this.
The following conditions are set for the Add new row to another table... action (action2) in the
If the preview version desktop mode is switched off and this group action is executed on multiple records by bulk action,
the action2 performed on the first record only in the child table will be executed,
naturally only one row of records will be created in the parent table.
For other multiple records in the child table, the action2 will not meet the execution conditions and will be ignored.
However, when the preview version desktop mode is on, this bulk action causes an error.
Naturally I consider the behaviour to be more correct when the preview version is switched off,
I would like to report this as a bug to the Appsheet team.
Yes, this is a clear bug in new desktop mode. I have noticed this at the very early day after the new desktop ux was released for preview and I shared this with AppSheet dev team years ago, but unfortunately this is not yet corrected until now.
"Add new row" action is (has been) working as "UPSERT" operation. When there is existing row with the same ID, it will update the existing record (in other words, it overwrites the existing record) while the action will add new row when there is no existing record with the same key value.
Please kindly post your ticke to support desk to call for the corrective action as soon as they can.
Thank you for your response!
Case ID 2-8861000035272
I submitted a support ticket with
This is the first time I have learned about the following.
Thank you also for this.
"Add new row" action is (has been) working as "UPSERT" operation. When there is existing row with the same ID, it will update the existing record (in other words, it overwrites the existing record) while the action will add new row when there is no existing record with the same key value.
Thank you for posting the issue to the support desk. Appreciate if you keep sharing with their response. (Even though we expect their response could be normal one, like "We would like to inform you that we have escalated your issue to our specialist team and our team is working on your issue to resolve it as soon as possible. ".........(x.x)
In the meantime, in order for your current data change action to work, the workaround is to delete the parent record before you invoke the action to add new row to parent table. What I mean make a grouped action which comprise of 1 ) delete parent record 2) add new row to parent table in this sequence.
Then this action would work under new desk top ux.
Not an ideal solution, but at least this is working workaround for now.
Thank you!
I had just sent out the following post again because the example of my application was complicated and difficult to understand when I last posted it.
https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Bug-when-using-the-Add-a-new-row-action-in-Desk...
Thank you so much also for the workaround suggested by Tsuji!
I never had that idea...
(Once again you are a really awesome person...)
Now, here is the response from the support desk
-----------------------------------------------------------------
It appears that the key column of the parent table is currently set to a DateTime data type using the PID_datetime column. contributing to the issues you're facing.
To improve the stability and functionality of your application, we recommend using the UniqueID() function for the key column. generates a unique identifier for each row, ensuring that each entry is distinct and easily referenced.
------------------------------------------------------------------
This is not a solution to this problem at all.
However, I think the example of my application in my previous post was also difficult to understand,
I will still share this post with the support desk again and try to get them to understand what the problem is!
https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Bug-when-using-the-Add-a-new-row-action-in-Desk...
Response back from the support desk is completely out of the point. Very much annoying. They do not have capability to understand the problems, so they always come back with answer which is completely out of focus.... (So I tend not to contact with Google support as it is just waste of our time)
This particular issue persists for years, still not attended. This indicate the issue will stay forever.
To tackle the issue we are facing, to wait for correct by AppSheet team is not looking like a realistic story, so better to escate error using the workaround I shared with you earlier.
User | Count |
---|---|
17 | |
11 | |
7 | |
4 | |
3 |