I have a form that in the form loads rules does the following:
Check if Locked:
- if Locked = TRUE AND
- if Locked != userName()
- then Switch to read only Locked view, do not run any further rules
Lock Form:
- Set Locked = TRUE
- Set Locker = userName()
- Submit on main data connection
Then some further rules to set fields for validation
This sets the locking fields so that the first rule will force the user to a 'locked' view of the form as someone is already editing it.
All of the Submit and Close button on the form (rules buttons) do the following (aside from anything else they do):
- Set Locked = FALSE
- Set Locker = ""
- Submit on main data connection
- Close form.
The form load rules are working correctly and setting the locking fields, however when I try to use a Close or Submit button on the form, I get a save conflict error stating my changes conflict with another users changes?? I know I am the only person using the form as I am still building it, but I need this locking feature to work (it's a custom list, so no check in/out).
Does anyone have any idea why I would get the conflict? If I disable the submit within the form load rules, I no longer get the save conflict, however that means the locking fields are not saved and so someone else could edit the form at the same time...
The form submit options are set to allow submission using rules.