Hi there,
Sorry for posting so late after this thread was created, but i came here as i was searching for a way to do something similar, and as i struggled a bit, i now am so happy that i found a solution to my similar problem that i want to post it.
So i have a portal which i use to create new records inside a join table. I create records inside the portal by adding a value to the foreign key field of the last row. So i have a fk field inside the portal which starts empty (last row) and when i enter a value it creates a row (a record) with that value on the fk field, some fields from a relative table, and some fields that i want to input each time (like quantity and price). So after the creation i wanted to make sure that the user cant enter another value to the fk, because that would change the relative fields like product name and barcode, but the fields quantity and price would stay the same. I just wanted a way to lock the fk field after the record row is created but still be able to change values within the other fields of the same record row.
So what i did is trigger a script when i enter the fk field that checks if the field is empty and if it is, then it does nothing so u can continue typing as normal, but if it isnt empty (like the already created records) it reverts the record to its previous state (which is being empty).
the scrip can be assigned to any field in the database:
if [ not IsEmpty ( Get ( ActiveFieldContents) )]
Revert Record/Request [With dialog:Off]
End If
Exit Script
So whenever I click inside the fk field of a created record to enter values, it just exits the field without making any change. I know some of you out there will already know 10 better ways to do this, but still this solution is enough to get a newbie like me to the hype train. wooohooo go me