ConfiForms Rules for Field Definition for Multiple Radio Buttons

Munyiva Ngea December 27, 2017

How can i "listen" to the values set for multiple radio button fields whose value can either be yes or no. The following are the rules i have set that are NOT working:

 

I have implemented ConfiForms Rules for Field Definition as indicated below

Rule 1:

Checks if either of the  15 fields is set to no then sets the value of compliance field to "Does not Comply"


      <ac:structured-macro ac:macro-id="c3fa433e-1ee7-478a-875d-e186143e6506" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">sa1:no OR a1:no OR a9:no OR sm1:no OR sm3:no OR sm4:no OR sm7:no OR sm8:no OR ac1:no OR ac2:no OR ac3:no OR ac4:no OR ac11:no OR iv3:no OR iv7:no OR iv9:no OR oe5:no OR eh8:no OR dp3:no OR cs4:no OR cs5:no OR cs6:no OR cs7:no OR cs8:no OR hs4:no OR hs5:no OR hs6:no</ac:parameter>
        <ac:parameter ac:name="values">Compliance=Does NOT Comply</ac:parameter>
        <ac:parameter ac:name="action">Set value</ac:parameter>
        <ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
        <ac:parameter ac:name="actionFieldName">sa1,a1,a9,sm1,sm3,sm4,sm7,sm8,ac1,ac2,ac3,ac4,ac11,iv3,iv7,iv9,oe5,eh8,dp3,cs4,cs5,cs6,cs7,cs8,hs4,hs5,hs6</ac:parameter>
      </ac:structured-macro>

Rule 2:

Checks if either ALL of the 15  fields are set to yes then sets the value of compliance field to "Complies"

<ac:structured-macro ac:macro-id="79b7c027-cde3-4bb8-8bec-c154dd4cfe33" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">sa1:yes AND a1:yes AND a9:yes AND sm1:yes AND sm3:yes AND sm4:yes AND sm7:yes AND sm8:yes AND ac1:yes AND ac2:yes AND ac3:yes AND ac4:yes AND ac11:yes AND iv3:yes AND iv7:yes AND iv9:yes AND oe5:yes AND eh8:yes AND dp3:yes AND cs4:yes AND cs5:yes AND cs6:yes AND cs7:yes AND cs8:yes AND hs4:yes AND hs5:yes AND hs6:yes</ac:parameter>
        <ac:parameter ac:name="values">Compliance=Complies</ac:parameter>
        <ac:parameter ac:name="action">Set value</ac:parameter>
        <ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
        <ac:parameter ac:name="actionFieldName">sa1,a1,a9,sm1,sm3,sm4,sm7,sm8,ac1,ac2,ac3,ac4,ac11,iv3,iv7,iv9,oe5,eh8,dp3,cs4,cs5,cs6,cs7,cs8,hs4,hs5,hs6</ac:parameter>
      </ac:structured-macro>

 

Any assistance is appreciated.

Thanks in advance.

 

1 answer

0 votes
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2018

At the time of asking this question you had to write the "rule 2" for each field you want to track... 15 times in your case for every "sm" field

Now, t is possible to use regular expressions in this parameter and have something like sm* to track the changes in all your "sm" fields and do it with just one rule

Gaurav Anand October 31, 2019

Our Field names are AutoGRaisedBy and AutoGEmail, can you please suggest how we can use Regular expression to have a single validation rule applicable for both these Fields? Have tries AutoG* and AutoG.* does not work.

 

any help on this would be helpful.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 1, 2019

Could you please explain a bit more what you are trying to do and where exactly you want to use your regular expression?

Gaurav Anand November 1, 2019

So in ConfiForms Rules for Field Definition we have the "Field Name" on which we can apply some rules, it also says you can use Regular expression to apply the same rules on multiple fields.

 

Now in my case the Field names are AutoGRaisedBy and AutoGEmail, what I need to do is apply a single rule through ConfiForms Rules for Field Definition that applies to both, and I believe regular expression can help, but dnt know how to use it?

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 1, 2019

What type of action your choose in the Rules macro and do you have the same regular expression for both fields?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events