Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Go Back Script revisited

Featured Replies

My Go Back script attached to my back button is almost working as intended, thanks to everyone here who helped me. The only problem is the Layout [color:"purple"] mode .

If I am on a layout in preview mode then go to a layout in browse mode, when I hit my back button, it brings me back to the appropriate layout but it stays in browse mode. I have a globallayoutmode field (Global number), inserted in the appropriate layout change scripts [color:"purple"]Set Field ["globallayoutmode", "Status(CurrentMode)"].

And here's the script attached to my back button:

[color:"blue"]

Go to Layout ["globallayoutnumber"]

If ["globallayoutmode = 0"]

Enter Browse Mode[]

Else

If ["globallayoutmode = 1"]

Enter Find Mode [Restore, Pause]

End if

If ["globallayoutmode = 2"]

Enter Preview Mode[Pause]

End if

End if

I'm seriously puzzled at the moment.

shocked.gif

Is there anyone that can see what's wrong?

I don't think that this would have a major impact on your script, but I would move the first End If to the pair of End Ifs and put an Else step in its place. So it looks like

If

Else

If

Else

If

End If

End If

End If

Also, you should know that the Restore option on Enter Find Mode will not restore the most recent request(s) but the request performed just prior to the creation of the script, or the request performed just prior to opening the created script and opting to Replace the find request(s) after clicking OK. So I wouldn't use the Restore option with your back button, since it may serve to only confuse your users when a request appears that they didn't create.

Regarding your globallayoutmode, are you setting it before changing modes, when you move to a different layout?

  • Author

Thanks -Queue-

Regarding my globallayoutmode, I have tried setting it before AND after changing modes but it doesn't change, it doesn't work.

Put your globallayoutmode field on the layout, delete any number that may be in it, and check its value after the script step has been performed. Does it contain the correct number now?

  • Author

HA!!

No, the value in it is always 0

This might explains why my back button always returns me to a

page in browse mode. Do you have any idea where I should check first

for errors?

  • Author

I think I'm getting there, Im toying around with the order of the commands in my scripts and now I get the right layout mode number grin.gif

Thanks a whole lot smile.gif

  • Author

Allright I thought I knew what was wrong but I guess *I* was wrong grin.gif

I am pretty sure my problem is in the order of my script, but I've tried just about every order possible to no avail...

Here's the script:

[color:"red"]

Enter Browse Mode []

Set Field ["globallayoutnumber", "Status(CurrentLayoutNumber)"]

Allow User Abort [Off]

Print setup [Restore, No dialog]

Go To layout ["Labels"]

Enter Preview Mode [Pause]

Set Field ["globallayoutmode", "Status(CurrentMode)"] //---This is the line that I think is at the wrong place---//

Go To Layout [original layout]

Enter Browse Mode []

confused.gif

Edit: I forgot to specify, my problem is still that my globallayoutmode doesn't work.

The result with your script should be a 2 in globallayoutmode. I just tested it and it worked. Are you certain that globallayoutmode is defined as a global? Could you zip and attach the problem file?

  • Author

Yes Queue, it's defined as a global, I tested it and the number 2 appears in the field, I seriously dont know whats wrong. I'd rather e-mail you the file directly though, I'm not sure my bosses would approve of me posting their project on a message board wink.gif

  • Author

Ok I finally corrected it.

Instead of placing a global for the layout mode, I only placed a global for the layout number, which was working correctly and attached subscripts to my back button ie: If globallayoutnumber = 3 perform script: go to labels

Everything is working fine now, many thanks to all of you who helped me!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.