Rows are showing OUT of order in Google Sheet and app after sync

Hi,

I have a Flight Reporting app that is causing me issues when synced, let me detail that

The Flight Report Information (Parent) has multiples Routes (Child). When created in the app, they show in the right order as the user entered them (route 1, Route 2, etc..)

For context we operate in very remote locations so the app works offline, and it's when syncing happens that the issue pops

I turn off automatic update because of our challenging environment, and the user has to sync themselves. I have specifically told them (and myself as I'm also a user) to sync only when internet connectivity is good, and when the report is completed.

I went in the Audit Logs, and cannot find anything specifically wrong in there, I am not an Expert however, so I might be missing some things

I have logged the Route Number in a Collumn to make sure I see it visually in the Speadsheet, sure enough the issue happened multiple times since, With Route 1 being the last in the list, 3rd one first.. etc...

 

Now My question :

Is there a way to tell the app that Route 1 has to be the FIRST in the UI

Can I do the same thing in the HTLM Export to PDF (has it's Integral to the process to have a pdf)

Or

Is there anyway to Make sure the synced CHILD are in the correct order

 

Thanks !

Capture dโ€™eฬcran, le 2022-08-01 aฬ€ 17.17.50.png

Capture dโ€™eฬcran, le 2022-08-01 aฬ€ 16.08.15.png

 

 

Solved Solved
0 8 165
1 ACCEPTED SOLUTION

Hello !! thanks so much for your time, I ended up fixing it with a bit of your input and a bit of mine lol

I first Went in the UX Panel and sorted the "Route" view by "Route_Number"

Then in UX, Options, I turned OFF user sorting, has we don't need that in my case anyway

Finally, I used the "OrderBy()" Expression in the PDF generation to do it,

I tested it , working flawlessly, Thanks SO MUCH for you time, sorry for the earlier rant, but it gave me the kick in the butt i needed !

Capture dโ€™eฬcran, le 2022-08-02 aฬ€ 08.48.58.pngCapture dโ€™eฬcran, le 2022-08-02 aฬ€ 08.48.45.pngCapture dโ€™eฬcran, le 2022-08-02 aฬ€ 08.45.51.png

View solution in original post

8 REPLIES 8

When you're dealing with connectivity issues, these scenarios must be handled with care (as you've found).

----------------------------------------------------------------------------------------

Orderby() will help put things back in the order you want.

----------------------------------------------------------------------------------------

There ARE ways that you could build your app, which would only allow people to save records in the correct order.

  • But honestly, unless its essential that the actually be captured in the field in order....
  • You're better off leaving the flexibility of doing things out of order if they need to.

Flexibility is one of the things that's key to smooth operations of AppSheet apps in an limited connectivity environment.

Thanks for your reply, I will look into this but I have to ask for more pointers :

Where would I put that expression in (The child, the parent? Should i use the collumn I have numbered ?)

Do you have an example app or scenario I can refer to ?

 

Thanks !


@JpChapron wrote:

Where would I put that expression in (The child, the parent? Should i use the column I have numbered ?)


Any place where you're using the "list" of things.  Generally this is inside your document creation template.

<<START: [Related Whatever]>>

           BECOMES

<<START: OrderBy([Related Whatever], [Order_Column])>>

 

I've got a sample app that demonstrates how to implement a manual sorting system in your app:

Thanks so much ! I believe I'm in the right track, 
Question however, As I'm looking in your sample app, it seems I would need to add to my [Related Routes] simply the OrderBy() expression and [Route_Number] to sort it as that

However when I do that, It simply breaks the child relation, I can add, but I never see the child created...

I'm still missing something it seems. Can I ask you again for some guidance?

 

thanks so much

Yeah that's an unfortunate side effect of modifying the formula for those
system generated reverse references.

If you look at the order table actions, you'll see there's an action there
to add a new item to the order - a Link to form()
- you'll need to do something similar to that

Best
Matt

I see,

To be honest i find that it is pretty hard to follow for the user and creates now new problems :

Since the "Link to form" is an inline action and not a clear UI element to add, it creates the potential error that the user will still use the "add" button at the bottom. Which can be disabled by putting the Table in Read only but then If i need to delete a row, I need to create another Link to form, which again creates user UI problems, plus I believe the users wouldn't be able to make changes to the table.

The "add" can be solved like you did by adding a dropdown to select which parent it belongs to, but my users need a very, very user guided experience and do not understand the relationship between parent and child.

Finally, I find it hard to believe appsheet cannot "Queue" server updates to happen once the other is finished. I'll keep tinkering but the more it's going the more it's likely that AppSheet will not be able to support our type of work, which is very sad and unfortunate, since we already put man hours, training, and money in the project.

A bit of a rant i know. 

AppSheet has it's peculiarities sure, but all the things you're talking about are not deal-breakers
  - they're just things that haven't been taken care of yet

  • All of these issues you're describing have been dealt with long ago, there's tried and true methods in place to address all the pit-falls you're falling into.

The problem is finding all this information

-----------------------------------------------------------------------

The solution for removing the presence of the "add" button, under the inline view, is as simple as hiding that add button.

  • Not setting the table permissions to read-only - then you can't write data to the table.
  • You just need to hide the actual action that people use to add records, and that's the system generated add action for the table.

https://www.googlecloudcommunity.com/gc/forums/searchpage/tab/message?advanced=false&allow_punctuati...

-----------------------------------------------------------------------

In fact, being able to take over the tap interaction that a user makes in order to create a new record, opens up the opportunity to insert hidden actions in there as well. 

So when they tap the button to "add a new item" there's actually other things that happen first;

  • like updating some value in the background,
  • running a check over other records,
  • maybe sending an email,
  • and THEN going the form for the user to do something.

------------------------------------------------------------------------

It's easy to get discouraged.  Don't  (^_^)

  • Especially since you mentioned you're operating in remote locations - AppSheet was literally made for you

Hello !! thanks so much for your time, I ended up fixing it with a bit of your input and a bit of mine lol

I first Went in the UX Panel and sorted the "Route" view by "Route_Number"

Then in UX, Options, I turned OFF user sorting, has we don't need that in my case anyway

Finally, I used the "OrderBy()" Expression in the PDF generation to do it,

I tested it , working flawlessly, Thanks SO MUCH for you time, sorry for the earlier rant, but it gave me the kick in the butt i needed !

Capture dโ€™eฬcran, le 2022-08-02 aฬ€ 08.48.58.pngCapture dโ€™eฬcran, le 2022-08-02 aฬ€ 08.48.45.pngCapture dโ€™eฬcran, le 2022-08-02 aฬ€ 08.45.51.png

Top Labels in this Space