To sort the portal by a field other than "Member Number" copy the script and substitute the desired field name for "Member Number". The found set and the sort order of the original layout will not be affected. ![]() The portal will by sorted by whatever field contents you set the Club::Sort_Order field to. # if the portal is on a named tab then Go to Object (name of the tab object) here The Script to sort by Member Number instead of by Member Name goes like this: The portal on whatever layout is being used should be set up to sort by the "Club::Sort_By" field which does not have to be present on that portal unless you want it there. Inspired by Techphan's solution (but not quite understanding it in full) here's what works for me.įirst create a "Sort_Order" field and a "Sort by" layout with the relevant fields on it. **Done by memory as I have not actually done this technique for quite a while. ![]() The calculated button over the fields can take you to the appropriate tab by using "Go to Object" in a script. ![]() ![]() There are alternative methods by using multiple tabs and identical portals but defined differently in the sort. Make a button out of each one and define each as the appropriate script (see below for scripts).ĥ) Make two scripts: the first one is Set Field (Global::SortOrder="Name") and the next one Set Field (Global::SortOrder="Number"). There is a way to do it, but it involves a bit of trickery.**ġ) Create a new global field called Global::SortOrder (I actually use a table named "Global" to store most of my global fields).Ģ) Create a new calculated field called Member::Sort: "Case (Global::SortOrder="Name" Member::Name Global::SortOrder="Number" Member::Number).ģ) Set your portal to sort by Member::Sort.Ĥ) Create field labels over the portal area above Member::Name and Member::Number fields.
0 Comments
Leave a Reply. |