I have this following situation in a FileMaker file:
1. User searches for and finds records in Table A.
2. User clicks a button in record row a1. This button is attached to script s1.
3. Script s1 has two branches:
a. If there is a related record in Table B, script goes to this related record.
b. If there is no related record in Table B, script creates a new related record, then goes to it.
4. User winds up in record b1 and layout b1 in Table B.
How can I code this behavior in PHP? I get error 101 - Record is missing.
I have this form snippet for page A.
I have this PHP snippet for page B.
$newPerformScript = & $fm->newPerformScriptCommand(myLayout, myScript, myParameter);
$result = $newPerformScript->execute();
ExitOnError($result);
I'm guessing I need to tell $newPerformScript to read the value of keyProjectID, but I'm not sure how/where to insert it.
TIA,
ken