Custom ordered portals

Every software user loves convenience. Heck, every human being loves convenience. So, why not provide it within every aspect of your user interface?

The problem, however, which you may run across is figuring certain features out. FileMaker can be a very simple program or something quite complex if you're trying to do something custom like providing users with the ability to custom order their related records.

The most basic sequential ordering of data comes in the form of simply providing a number field called something like "order", "sequence" or the more mathematically inclined "delta". Once you have the field, you can allow the user to manually change the values. But, that becomes a real pain when you try to add a record between the numbers 1 and 2. You now have a user entering 1.5 or 1.3 and 1.7 in order to get values to sort properly. Then, having to manually reserialize all the original values is just an unnecessary pain.

Well, the best solution to this problem is to simply use the automation provided by FileMaker's powerful scripting engine. With a few scripts, a value list, and a bit of FileMaker know-how, we can provide a very quick-and-easy method of allowing users to custom order portal rows.

AttachmentSize
CustomOrderedPortals.zip1.65 MB

Comments

How about a go to portal row (first) at the end of the ReSerialize script, so you are not left hanging in space at the bottom???

Actually, I would probably capture the target portal row and go to that exact row. Add these to the OnObjectSave script. Thanks John!

Set Variable [ $portalRow ; Value: Get ( ActiveFieldContents ) ]
[... rest of existing script ...]
Go to Portal Row [ Select: On ; With dialog: Off ; If ( $portalRow ≥ 1 ; $portalRow ; 1 ) ]

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Hey, Matt. Very clever interface!

This helps me permit administrative users to select their own preferred order of records using a comfortable, easy to understand portal interface. Now they can specify "General, Lt. Colonel, Major, Captain, Sargent, Chaplain, Private…" with ease.

I soon realized I could take this practical interface in yet another direction. I could inject the number of invisible BOM (byte order marks) in front of values of the "name" field according to the ReSerialized numeric value. This allows me to keep the user's desired order of a dynamic value list based on a dedicated table of records. Then I only need to remember to remove the BOM mark whenever the user inserts the selected name value into a data field (probably from a pop-up menu). BTW, I also find it handy to include the term "BOM" in the value list name to remind me of the required BOM stripping when inserting a list value into a field.

See this link for discussion of using BOM to customize the order of value list items:

<a href= "https://www.filemakermagazine.com/videos/ultimate-value-list-control%20" >Ultimate Value List Control</a>

Cheers!

schemaMaster70