Need help understanding the usage of the "force sync" parameter

My use case is an action button that navigates to another app using LINKTOVIEW().

Navigation works beautifully and when exercising the button in the editor a Sync is even is performed when transitioning to the second app. Perfect! Exactly what I want.

However, when testing from the browser or a mobile device, the Sync is NOT performed. So, I need to introduce a forced Sync.

The widely published way to force a Sync is to add this parameter to the navigation link:

..."&at=", ENCODEURL(NOW()+1)

Using a CONCATENATE() to add the force Sync, my expression looks like this:

CONCATENATE(LINKTOVIEW(ANY(SELECT(Apps[Return View], [App ID] = [_THISROW].[App ID])), [App ID]),  "&at=", ENCODEURL(NOW()+1))

This results in the link text looking like that in the image below:

Looks good to me and works great from the editor! However, when the button is tapped from either a browser view or a mobile device - no Sync is performed!!

I did try replacing “&at” with “#at”. A Sync IS performed. On the browser the Sync is performed TWICE then navigates to the refreshed app as expected. On a mobile device, a Sync IS performed and it looks like the app is opening refreshed but then it immediately goes to a blank white screen. I have to close AppSheet completely and re-open to recover.

What am I missing to get the navigation to perform a Sync?

1 Like

Try simply leaving that pound sign in the deeplink - does that interfere with the sync happening on the app editor? If not, seems like the hashtag is needed and that might fix things.

I’ve been having issues with the browser in general refusing to get the latest version of the app. It just merrily assumes everything is the same. Doesn’t check for updates on launch. Doesn’t respect starting screen. It just grabs the cached version from however long ago until I forcefully sync it to get all the changes.

I believe this is related to the update that “resumes” the last state of the app, instead of just forcing the users to the start screen - which I preferred.

1 Like

I did try with “#at” and while it performs a Sync, it doesn’t behave correctly. Browser version Syncs twice and then is ok. The biggest problem is that, although the mobile version Syncs, it leaves the app displayed as a blank white screen - no menu, no buttons, absolutely nothing but white!!

Also, by introducing the “#at”, that means the “#” is in the URL twice. I believe that’s incorrect syntax but not completely certain.

1 Like

That would be an error/issue, the double of the hash, yes.

@WillowMobileSystems have you reached out to support yet, I would - this looks like a bug.

Then again… now that I think about it:

  • I just ran an app, in a browser, with a forced sync action and it worked.

Testing my phone…

  • Indeed it worked there too.

So there’s something funky going on. If you want, you can share your app and I’ll have a look.

1 Like

Can you share the expression, or suedo-expression, that you used so I can compare?

And was this a link to navigate between Apps?

1 Like

It was a regular deeplink expression with the force-sync code at the end.

I see that you are not encoding the DateTime. Is that not necessary? Maybe its interfering with the force sync? I’ll try without the ENCODEURL() function.

1 Like

Could be - no, I just tag that little bit on the end of any deeplink to get it to sync.

  • LinktoView
  • LinkToRow

@Bahbus. @MultiTech_Visions

Ok, I had a chance to play a little more with the “force sync” capability and here is what I know.

Editor - It doesn’t seem to matter whether you have the “&at=” parameter attached or not, when navigating to another app a Sync is performed.

Browser and Mobile - If I try to navigate to another app with the “&at=” parameter, no Sync is performed. If I simply change the view to one within the same app - no other changes to the action - a Sunc is executed. See images below.

I’m not sure if this is a bug or not but will open it to support for their input.


Action to go to another app - Force Sync does not happen

Action to go to another app - BUT use view in same app - Force Sync DOES occur

1 Like

The &at= URL parameter will be interpreted at the target’s end, not at the origin’s. Therefore, when using it to navigate to a different app, I would not expect a sync to happen before leaving the current app.

1 Like

I don’t ever do any app juggling, so to speak, but I would agree with @Steve’s expectation… It’s a go here and sync. Not a sync and then go here.

1 Like

I am not quite sure what I said to give this impression. I want the Sync to happen in the targeted App.

I have raised this to support and they are looking at it.

1 Like

Oh, well since you’re changing apps AND you want the freshest version of it, try using refresh=1 as explained here:

3 Likes

Now that you mentioned it, I do recall mention of this before. My impression was that this only works in browsers but I’ll give it a go and see what happens!

2 Likes

Seems like this might be the key really; the problem we’re fighting here is the fact that the app “remembers” where you were - won’t this wipe-thing solve that?

@WillowMobileSystems I’m curious to hear the results of this.

I guess it depends. Sure, it remembers where you were. But if you’re demanding a specific location within said app refreshed, I doubt it would be needed. But I am curious as to see the results of each one and both together.

So far nothing is resolving the issue. AppSheet support is looking at this as well. Here is what I know.

The “refresh” and “wipe” did not work - for either mobile or browser. I tried “refresh” first and then added “wipe”. Just for grins, I also tried adding the “&at=” parameter. No Sync.

One interesting thing I realized. When I navigate from App1 to App2, a Sync happens EVERY time without a forced Sync. It is the navigation back to App1 where I am having the trouble.

So I tried to identify the differences in the transitions. When I transition from App1 to App2, I use a LINKTOFORM(). I tried implementing a LINKTOFORM() to go back to App1, no difference in Sync behavior.

Before transitioning to App2, I am locking down all the tables in App1 to be READ ONLY - which is why I need the Sync to open the table back up again due to changes made. So, I thought maybe the locking down of the tables was preventing the Sync. I removed that code from all of the tables and tried the navigation again - still no Sync.

My next effort will be to try what AppSheet is doing, create a couple of new apps and try simple navigation between them to see if I can re-create it. I suspect that I will.

1 Like

Thanks for keeping us all posted. partyparrot (Appsheet)

I created two very simple apps each having a button to navigate to the other. The very first transition on a mobile device performs a Sync (without the force :slight_smile: ). Each transition after that simply shows the “Starting up” message and goes straight into the app. No additional changes were able to force a Sync.

The ONLY time I could get the “Syncing app” message was if I used “#at=” instead of “&at=”. On a mobile device, the app acts as if it’s syncing then goes to a completely white screen - no visual app properties at all - only the line with the time, battery % and signal strength.

Using “#at=” in the browser, the Sync is performed twice and then enters the app as normal. I guess its making up for the failed Sync on mobile. :slight_smile:

Its in AppSheet’s hands now!

1 Like