August 3, 200223 yr 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.
August 3, 200223 yr 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
August 3, 200223 yr Author 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?
August 3, 200223 yr As part of your navigation script to move to the supplier file, call a script in that file that performs the sort. -bd
Create an account or sign in to comment