Dynamic forms, multiple conditions, timestamp field

  • 0
  • 1
  • Question
  • Updated 10 months ago
  • Answered
hi,

I have a similair issue like in this post just a bit different and I don't see the sollution yet.

I have created an change request form with a timestamp:
basically " When approve field is chechek that set timestamp to current data/time and change to read-only".
The approve field is of the checkbox-type.

Where there is a approval field there should also be a rejection field. And of course I like to timestamp that rejection too.
Creating a timestamp for apprval and a seperate timestamp for rejection might be a workaround.
Another wordkaround could be to create a decision multiplchoice field (Approved/Rejected) and create a dynamic rule like "when decision-field isnot empty set timestamp etc etc" .

However for some other reasons I would prefer to use the two checkbox-fields approach.

Does somebody has a suggestion for a workaround on the DynFormRules limitation??

Thanks Jan-Willem
 
Photo of Jan-Willem

Jan-Willem

  • 490 Points 250 badge 2x thumb

Posted 10 months ago

  • 0
  • 1
Photo of Evan Martinez

Evan Martinez, Community Manager

  • 8,814 Points 5k badge 2x thumb
Hi Jan,

If you are looking to fill a single Date/Time field when either of those two checkbox fields is checked it is possible to set up a single form rule that does this. You would just select multiple conditions are true in the form rule and then set it to any of the two checkbox fields being checked. Then whether you reject or accept it the singular TimeStamp field will be changed to the current data and time will be filled in. Then you could also add on another condition if you wanted to also make it read only after, etc. 

Photo of Jan-Willem

Jan-Willem

  • 490 Points 250 badge 2x thumb
Yes,  thanks, that's seems the way to handle this.
"making simple thing difficult and vice versa"
Photo of Jan-Willem

Jan-Willem

  • 490 Points 250 badge 2x thumb
Yes,  thanks, that's seems the way to handle this.
"making simple thing difficult and vice versa"

Having said that I stumple direct into another problem as "approved" ought to open a next level approve section and "reject" should simply close the the CR.


https://snag.gy/lGV03A.jpg
Photo of Evan Martinez

Evan Martinez, Community Manager

  • 8,814 Points 5k badge 2x thumb
If you have something that is specific to just one condition, such as approved opening up a new section, my suggestion would be to just spin that off into its own focused form rule. That way that change that is specific to only one fields output is isolated and simplified. 
Photo of Jan-Willem

Jan-Willem

  • 490 Points 250 badge 2x thumb
You're right.
You can use a field many times in a condition but only once in an action.
It's not really helping the overview but it works.

Is there than any reason why to order Dynamic rules?
Photo of Evan Martinez

Evan Martinez, Community Manager

  • 8,814 Points 5k badge 2x thumb
Dynamic Form rules fire in the order they are arranged, largely if dynamic form rules are all correct and aren't showing errors it shouldn't make a difference to your user experience. I usually suggest putting important rules at the top so they are easy to find for editing and updating.