Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up valid'n rule to require a value, cond'l on the value of 2 other fields in the form?

Bill Mills February 7, 2024

My form has 4 fields: Portfolio, BU, Sub-BU, Priority.  

  • Portfolio and BU are both visible on the blank form
  • Sub-BU and Priority are conditionally hidden
  • I have a Rules for FD macro that says when BU = "123", show the Sub-BU field
    • Field name: BU
    • Condition: BU:123
    • Action to execute *: Show field
    • Actionable field name: Sub-BU
  • I have a Rules for FD macro that says when Portfolio does not = "ABC" and BU = "123", show the Priority field
    • Field name: BU, Portfolio
    • Condition: BU:123 AND !Portfolio"ABC"
    • Action to execute *" Show field
    • Actionable field name: Priority

With this set up, I am able to successfully show the fields as desired.  What I'm having trouble with is the validation. 

  • I have a Rules for FD macro that says if BU = "123" require a value in Sub-BU
    • Field name (or regular expression): Sub-BU
    • Condition: BU:123
    • Action to execute *: Validation rule
    • Validation rule: .+

I would like to add another validation rule that would also require a value for Priority, but only when BU is "123" and Portfolio isn't "ABC". 

  • If Portfolio is "ABC" then Priority won't require a value even when the BU is "123"
  • I tried a Rules for FD macro: 
    • Field name: Priority
    • Condition: !fldPortfolio:ABC AND fldBU:123
    • Action to execute: Validation rule
    • Validation rule: .+

This results in still requiring a value in Priority even when Portfolio is ABC. 

Is what I'm trying to do possible?  Am I just missing the logic?

 

Appreciate any suggestions, thanks! 

 

 

 

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
February 7, 2024

Hi,

for your first Validation rule, set the condition to be

BU:123 AND Sub-BU:[empty]

Remove "Validation rule: .+", but set the "Message to show..." parameter

For the second "Validation Rule" also remove the "Validation rule: .+", and set the "Message to show..." parameter

Alex

Bill Mills February 8, 2024

This helped; it's now working as desired.  Thanks for the help! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events