Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,464,893
Community Members
 
Community Events
176
Community Groups

How do I write the validation rule for ensuring 2 fields match?

I have 4 fields (numeric):

  • TotalBudget
  • subVendorBudget
  • subTranslationBudget
  • subOtherBudget

Logically, the 3 sub fields should total the TotalBudget fields (but not automactially calculate).  

I have a 5th field (formula) called SummedBudget with this calculation and it works as desired:

("[entry.subVendorBudget]")+("[entry.subTranslationBudget]")+("[entry.subOtherBudget]")

 

Now I'm trying to create a validation rule to ensure TotalBudget equals SummedBudget but the validation error occurs even when they match, using these parameters:

Field name (or regular expression): TotalBudget

Condition: [entry.fldTotalBudget]:[entry.fldSummedBudget]

Action to execute *:  Validation rule

Execute only on user action: unchecked

Validation rule: blank

 

Please help!!

Thanks,

Bill

 

2 answers

1 accepted

0 votes
Answer accepted

Hi @Bill Mills 

The condition should be something like

fldTotalBudget:[entry.fldSummedBudget]

And you should specify "Message to show..." parameter in your validation rule (nothing else is necessary)

Alex

Hi @Alex Medved _ConfiForms_  thanks I've tried this but have the same issue.   If I don't inlclude ! at the beginning of the condition it accepts all entries even if they don't equal.  If I do include ! it won't accept any entries even when they do equal.  

Could this be due to fldSummedBudget is a formula field type and fldTotalBudget is numeric?

Could be (I have not had a chance to verify this myself yet), as the value for the formula field gets recalculated only on form submit

Not in UI (form view)

Alex

Thanks Alex, that answer actually helped me figure it out.   I changed the validation condition to:   !fldTotalBudget:(fldVendorBudget+fldTranslationBudget+fldOtherBudget) and it works. 

 

Thanks for your help!

0 votes
Florian Bonniec Community Leader Jul 27, 2022

Hi @Bill Mills 

 

What is the validator you are using, what app does it come from ?

 

Regards

Hello, the numeric fields are on a confluence form and completed by the user.  Sorry I'm not sure what you mean by validator; I'm a low intermediate user at best.  

Thanks!

Florian Bonniec Community Leader Jul 27, 2022

My bad had JIRA in mind due to the field and validator thing.

 

WHat do you use for form in Confluence ? It does not support forms without app, are you using Confiform ?

 

https://marketplace.atlassian.com/apps/1211860/confiforms-data-forms-workflows?tab=overview&hosting=datacenter

No worries.  Yes using confiforms.  I've tried using 

fldTotalBudget:[entry.fldSummedBudget]

as suggested by Alex with no luck.  :(   

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events