Assuming your portal is sorted by name, you could do something like this:
Set Variable [ $letter ; Value: Get ( ScriptParameter ) ]
Go to Field [ portalTable::Name ]
Go to Portal Row [ First ]
Exit Loop If [ Upper ( Left ( portalTable::Name )) = Upper ( $letter ) ]
Go to Portal Row [ Next ; Exit after last ]
Then just attach this script to each button bar segment with a parameter equal to the letter you want for that segment.
(P. S. If you can guarantee the letters will always be uppercase, you can omit the Upper function.)
Didn't think I'd have to do the loop. Not sure why I didn't think that..but...yeah.
Thanks so much!
If I understand what you want correctly (the desired last names by first letter to appear at the top of the portal), there's a way to do it without the button bar and script:
In your Client table create a calc for a field called FirstInitial defined as Left ( Last Name ; 1 ), and a global text field to hold one letter of the alphabet. Create a self join relationship to your client table where the FirstInitial field is greater than or equal to the global field in the main table.
Create an alphabet value list (each separated by a carriage return). Put your global field where your button bar is, but long enough to get all 26 letters of the alphabet and attach it to the value list. Make it a radio button. Now when you click one of the letters all last names greater than or equal to the letter clicked will appear in the portal. Of course, if
you want only last names beginning with letter clicked to appear, just change the relationship to FirstInitial equals global field.