Jump 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.

Sort Script in Startup Script isn't executing

Featured Replies

Could someone tell me why it might be that

my sort script does not execute when it's in the

startup script ,

but when I call the same exact script (after the startup script finishes),

then it works perfectly ?

Scripts apply to the table occurence associated with the layout you are on when the script fires. Does your sort script include a layout switch to a table based upon the records you wish to sort?

  • Author

Hmmmm.... Yes, I am switching layouts in the script.. but I get to the proper layout before the sub- script is called.

So, shouldn't I be okay ?

any ideas ?

Are you certain it's not sorting and then resorting for some reason? Did you put a Pause/Resume or Show Custom Dialog step in to see if it's ever activated?

Is there any reason the file might be opening without performing its on-open script? This was an issue in previous versions when the opening layout referenced a relationship in a closed file. It would open without performing the on-open script. I thought this had been resolved in 7 though.

  • Author

I've attached my script.. could someone take a peek ?

script.gif

Add a Show Custom Dialog step with Get(AccountName). It would seem the account name test is not successful, but putting a dialog step in will verify if it's getting past it.

  • Author

Thanks but, no, it is definitely getting past it.

It's doing everything up to that sort.

And the problem is... it's ALMOST sorting them.

with a few errors in the sorting... then if I manually run the sort script.. it sorts them as they should be.

what could be stopping this same exact sort script from running correctly in the original script.

Could it be a problem with the first part of the script taking too long to happen :

  • Author

could my problems be caused by the fact that i'm sorting by some fields that are "stored" calculated fields and some that are not :??

and if so, which do i want to be using ?

I'm not sure. Try turning Error Capture off and then open the file. See what, if any, errors are produced.

I'm curious why you're re-logging in as andersok_rtdb if the account name is already andersok_rtdb though.

  • Author

I'm relogging in because I"m authenticating against active directory, then relogging in to assign more specific privileges

I'm just testing it with andersok_rtdb 's account

I figured it out !!!! the problem had to do with the fact that the thing I was sorting on was a calculation that was based off of a related field.

For some reason, it wouldn't work while the startup script was running.

I got around it by passing the related value in the startup script into a global field in the table I am sorting on.

now it sorts. Anyone know why I had to do this to get it to work ? I don't understand what exactly the problem was.

Create an account or sign in to comment

Important Information

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

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.