Dynamic form rules - "when x is modified, uncheck y".

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I've got a checkbox that says someone is "Competent to Work". 

They are competent to work based on a few values but, we want to make it so that if they modify one of those values, the "Competent to Work" value goes from checked to unchecked.

I can do this using form rules and it works quite well - I'm using:

"when the record is saved - and "Position" has been changed" - change "Competent to Work" to "unchecked".

The problem here is that if someone creates a new record from scratch and sets "Position" to any value and then checks the box for "Competent to Work", the check gets undone after we've saved the record.

This appears to be because "Position" starts off as blank on a new record and when you set it to a particular value, it's like that value has been modified - therefore it triggers the rule to uncheck my "Competent to Work" value.


I've tried a couple of things like - if "Position" has been changed and "Date Created" is equal to or less than the current date ... and similar ideas... but I still can't stop the checkbox from being unchecked while having this rule active.

Photo of Gavin

Gavin

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,096 Points 50k badge 2x thumb
Try this

Make a new field called [Record Exists?] and make it a formula of
[Record ID#] > 0

It will be checked if the Record Exists, i.e. If you are not in Add mode.

Use that in your logic for the form Rule.

I'm just not sure though how many other rules you have. If there are a bunch of
"And any of the following are true"

Then this may not work in terms of being able to write the rule.
Photo of Gavin

Gavin

  • 0 Points
Awesome, thanks Mark.
This has worked perfectly for me!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,096 Points 50k badge 2x thumb
Thx for letting me know.
Photo of elandirayan

elandirayan

  • 10 Points
I am an user, ex sales rep creating an order, but the field is view mode to sales rep. When i set dynamic rules to record is saved and change status field as new order it is not working.

Also sales rep have vieew mode for thet particular field.