February 27, 200619 yr Why do my search results always come back sorted by record number instead of by last name (alpha)? I have a simple contact database that uses different layouts. One for browsing, one for searching etc...In the search layout, I script my "find" button to: 1. Perform Find [] 2. Sort Records [Restore; no dialog] 3. Goto Layout [browse "layoutname"] I specified sort to be by Name_last and then by Name_first. But when displaying the results in the layout in browse mode, it won't be sorted correctly. Thx.. Jess
February 27, 200619 yr Author Im not sure what you mean. I specified the sort order...but there aren't any other options that I can find for Restore.
February 27, 200619 yr Your second step in your script is a sort. Open up ScriptMaker, click on your script, and then on the [color:blue] Edit . With the Script Box open, click on [color:blue]Sort step, and then on [color:blue]Specify. you can then review what field or fields are involved in your sort, and adjust as needed. Lee
February 28, 200619 yr But when displaying the results in the layout in browse mode, it won't be sorted correctly. Could it be that one of the fields wrongly are defined as type number? --sd
February 28, 200619 yr A number field would certainly do it. Check the field type on the field that isn't sorting properly. Also, although you have a 'simple Contact database' do you have another table occurrence of that Contacts table? If so, are both browse and find layouts based upon the same TO? If it was based on another TO, it would still sort correctly but the sort isn't happening on the browse layout so you don't know! I assume you also have an Enter Find Mode beforehand? Because otherwise, you'd need to store the find results in the Perform Find[] and I don't see that listed. Usually I sort after arriving on the correct layout. I think it's a number ... but I wanted to give you some alternative ideas in case it wasn't. :wink2:
Create an account or sign in to comment