Steve S Posted August 3, 2002 Posted August 3, 2002 I have a 2 db solution setup. Art db and Supplier db. I open up with Art db in form view and want to move to Supplier into list view. Easily done. When Supplier opens I want it sorted to field "Supplier Name". It defaults to sorting by field Supplier ID(my primary key). So, I make a script, Page_Setup. Script is simple. Page Setup (restore, no dialog) Sort (restore, no dialog) When I make a button for this script it works perfectly. Proceeds to sort by Supplier Name. However, when I set Document Preferences for 'When opening "Supplier" perform script Page_Setup' it doesn't work. Its the same script. Works on button but doesn't work on open. Now a couple things. These databases open through FM Server 5.5. This is relation db and when I open Art, Supplier auto opens in hide. Could this be it? I open supplier with default password. don't know why this would affect anything, but could this be it? I cant think of anything else different. for now the button solution works, but i wish I could have it always sort under name so I don't have to hit button. Is there way to change default sort field? Thanks in advance for help.
LiveOak Posted August 3, 2002 Posted August 3, 2002 Chances are that the file has already been opened by a relationship. If a file is opened by a relationship, the startup script doesn't run. -bd
Steve S Posted August 3, 2002 Author Posted August 3, 2002 ok that makes sense to me. Now, is there any way I can get it to do what I want anyway. Make it sort by supplier name instead of by supplier id? If not, maybe another way to get it to force a sort when I move to Supplier DB?
LiveOak Posted August 3, 2002 Posted August 3, 2002 As part of your navigation script to move to the supplier file, call a script in that file that performs the sort. -bd
Recommended Posts
This topic is 8152 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now