How is the RecordID field defined? How does it assign a value to the new record? If it's a serial number field, does it assign the value "on Creation" or "on Commit"?
It uses an External Data Source?
Fields do not contain values until that field has been "committed". The RecordID from an external source will not update until the whole record has been updated. Otherwise the external source has control of the portal record.
What external source? Knowing that may make it possible to suggest a way to get this to work. On the other hand OnObjectSave--selected for the Portal rather than a field in the portal, may succeed in capturing the data you are trying to capture.
Hi PhilModJunk Sorry I clicked best answer by accident. Its a sql server connected with an ODBC driver. I tried the onObjectSave in the portal but it doesn't contain the recordID value? Thanks Leonaisse
Are you creating a record in the portal row manually and then the trigger controlled script is unable to set a variable from a field in the (externally sourced) portal table?
If so, try:
Set Variable [$Row ; value: Get ( CurrentPortalRowNumber ) ]
Go to Object ["Your Portal's object Name here"]
Go to Portal Row [no dialog ; $Row ]
Set Variable [$RecordID ; value.....
You should use the Name box in the inspector's position tab to give your portal an object name before trying out this script.