May 2, 2011 | filemaker
Limiting access of an FM user.
- Set a variable and get the account name
Set Variable [$$username; Value: Get (AccountName)]
- From the script where you want the set user limitation:
Perform Script ["getUserAccount"] //the script created in step 1
If [$$username = "some_user_name"]
Perform Script ["noAccessScript"]
Exit Script[]
else
…proceed normally
Apr 28, 2010 | filemaker
Creating a relationship using a global variable in FM10:
- create the relationship in the graph of FM (i.e. person: person_pk to history: person_fk)
- from inside a script, if you need to view the relationship:
Set Variable [$$person_id; Value:person::pk_person_id]
If [IsValid(person_pk2fk_history::fk_person_id]
Go to Related Record [Show only related records; From table: "person_pk2fk_history" Using layout: "history_edit" (person_pk2fk_history)
- from inside a script, if you need to create a new record as no relation exists yet:
Go to Layout ["history_edit"(person_pk2fk_history)
New Record/Request
Set Field[person_pk2fk_history::fk_person_id; $$person_id]
Commit Records/Requests[No dialog]
Some remarks: (more…)
Comments