Title
IWP onopen
Post
I have a members database and I allow access for chapter officers through IWP. I have assigned account names that equal the unique identifier for each officer. Using the Get(AccountName) I want to direct the "onopen" script to direct them to their individual record and a specific layout. I can get them to the correct layout by an if statement script using PrivilegeSet. Paraphrasing, if privilegeset = AAAA it goes to layout A. AndIF privilegeset = BBBB it goes to Layout B.
I cannot figure out how to insert the answer to get(accountName) into a find script that searches the unique identifier field. It is either that or make a special layout for all 15 chapters. I also thought a statement like Get(AccountName) and AccountName=Identifier might work.
I am struggling with the logic of scripts and need a roadmap, not driving directions. If I don't figure this out myself, I will never learn it.
My ultimate goal is to restrict chapter officers access so they only see members of their chapter. Am I overthinking the problem or simply a lost ball in high weeds?
If you have a text field in your table that stores the account name in a field, then this script will find the appropriate records in that table:
Enter find Mode [] //clear the pause check box
Set Field [YourTable::YourAccountNameField ; get ( AccountName ) ]
Set error capture [on] //keeps dialog from interrupting script if no records are found
Perform Find[]
That's the basic idea. There are many possible variations of that script you can use to get what you need.