Forums

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

Multi-Select Field Needs to Apply filter on another Multi-Select Field

Rayman Bacchus
Contributor
March 9, 2024

Hi All - hoping you can assist

I have a multi-select field where users can choose options  01 - 06 called ProductGroup

I want to use ProductGroup to apply a filter on another multi-select field called BusinessCapability

I currently have 3 rules sent up

if ProductGroup:01 then apply filter to BusinessCapability showing option 1

if ProductGroup:02 then apply filter to BusinessCapability showing option 3, 5, 8,12

if ProductGroup:03 then apply filter to BusinessCapability showing option 2, 4, 6,12

The issue is if I multiselect ProductGroups 01 and 02 together only the BusinessCapability options 3,5,8,12 are showing.

So I want to select ProductGroups 01 and 02 and 03

and the filter on BusinessCapability to show options 1, 2, 3, 4, 5, 6, 8,12

How would I go about doing this?  Is it even possible?

I should also mention I am restricted to the Out of the Box Confiforms solution and cannot install payed for macros, so something like Scriptrunner is not possible for me to use.

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
March 10, 2024

HI @Rayman Bacchus 

I afraid that with a given design you will need to define all the possible conditions as separate rules

Alex

Rayman Bacchus
Contributor
March 10, 2024

Thanks Alex - I was hoping to avoid that as there would be 720 rules:  6 x 5 x4 x 3 x 2 x1

I was thinking of creating another Form and then using Smart Multiselect, not sure if that would work though.

 

Alex Medved _ConfiForms_
Community Champion
March 10, 2024

Why would you need to so many? You dont have UNIQUE conbunations here as far as I can tell (reading you comment)

But honestly, I would really go with an extra form where I will define those rules as separate rows (matching Product and Business Capability) and in the current form using it through the smart multi-select field instead

Something like this

http://recordit.co/97Fhp7oIjK

Configuration for the reference

<ac:structured-macro ac:macro-id="f3ba6a55-856d-409c-a808-61d2ecfce8d2" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="5316141b-fdd4-4519-92c7-6e09a54f66a3" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="type">Embedded</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="a08f880f-23a1-4d0a-90b8-3956d7c3681a" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ProductGroup</ac:parameter>
<ac:parameter ac:name="fieldLabel">ProductGroup</ac:parameter>
<ac:parameter ac:name="values">false[01=Uno|02=Dos|03=Tres|]</ac:parameter>
<ac:parameter ac:name="type">select</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="cc790de5-ee26-410b-8182-b9c4fc2b9d1b" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">BusinessCapability</ac:parameter>
<ac:parameter ac:name="fieldLabel">BusinessCapability</ac:parameter>
<ac:parameter ac:name="values">false[1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=10|11=11|12=12|]</ac:parameter>
<ac:parameter ac:name="type">multi</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>Data</p>
<ac:structured-macro ac:macro-id="04746ff5-16fb-4d39-a709-1e1350b52d2f" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>Using</p>
<ac:structured-macro ac:macro-id="3f9075b3-e1d6-4973-a809-f31660aa19ad" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">using</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="b1ca1da5-5c29-445f-b286-93a6b268f081" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ProductGroup</ac:parameter>
<ac:parameter ac:name="fieldLabel">ProductGroup</ac:parameter>
<ac:parameter ac:name="values">[175276513|form|ProductGroup|true||]</ac:parameter>
<ac:parameter ac:name="type">smartmultiselect</ac:parameter>
</ac:structured-macro> <ac:structured-macro ac:macro-id="ce6532e0-429a-47a7-a90c-da7e45fdf4a7" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">!ProductGroup:[empty]</ac:parameter>
<ac:parameter ac:name="fieldName">BusinessCapability</ac:parameter>
<ac:parameter ac:name="values">id:[entry.ProductGroup.transform(BusinessCapability.transform(id).join( OR id:)).join( OR id:)]</ac:parameter>
<ac:parameter ac:name="action">Apply Filter on a field</ac:parameter>
<ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
<ac:parameter ac:name="actionFieldName">ProductGroup</ac:parameter>
</ac:structured-macro> <ac:structured-macro ac:macro-id="6f7e6bf7-2155-434c-bc78-359c2dfa407a" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">ProductGroup:[empty]</ac:parameter>
<ac:parameter ac:name="fieldName">BusinessCapability</ac:parameter>
<ac:parameter ac:name="values">*</ac:parameter>
<ac:parameter ac:name="action">Apply Filter on a field</ac:parameter>
<ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
<ac:parameter ac:name="actionFieldName">ProductGroup</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="5359113c-df12-40c9-9f9d-a22052da6b56" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">BusinessCapability</ac:parameter>
<ac:parameter ac:name="fieldLabel">BusinessCapability</ac:parameter>
<ac:parameter ac:name="values">false[1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=10|11=11|12=12|]</ac:parameter>
<ac:parameter ac:name="extras">id;false</ac:parameter>
<ac:parameter ac:name="type">multi</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="95217b18-cce3-42bc-84c5-ffa3a8ce99cb" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="formName">using</ac:parameter>
<ac:parameter ac:name="type">Embedded</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>

Alex

Rayman Bacchus
Contributor
March 12, 2024

Thanks Alex. 

 

This helped me out a lot.  I was hoping the transform command can pull label but I don't seem to be able to do thst

But that's just me as I really don't understand the transform command that well

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events