November 5, 200421 yr 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 ?
November 5, 200421 yr 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?
November 5, 200421 yr 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 ?
November 5, 200421 yr 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.
November 5, 200421 yr 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.
November 5, 200421 yr 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 :
November 5, 200421 yr 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 ?
November 5, 200421 yr 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.
November 5, 200421 yr 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