Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Select 2 values in a Field using Macro/ Trigger

Hi All,

I have a field named "Product_Group" and have ~ 10 Values in it.

For eg Product_Group : ABC, DEF, GHI, JKL, MNO, PQR, STU, VWX ,YZA and BCD.

I want to select ABC and want MNO to get slected automatically with this selection. This will be permanent and only when I select ABC.

On selection of others I dont want anything else to be selected.

Kindly let me know what should be the approch for it.

Thank you.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try this:

=if(Product_Group='ABC','(ABC|MNO)', if(GetSelectedCount(Product_Group), '('& concat(Product_Group,'|') &')'))

It will prevent selecting all values in Product_Group when clearing all values.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Add a Select in Field action to the OnSelect trigger of your Product_Group field. The search string would be

=if(Product_Group='ABC','(ABC|MNO)', '('& concat(Product_Group,'|') &')')

See attached example


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Gysbert,

I have just tried the OnSelect trigger

Field: Product_Group

Search String: =if(Product_Group='ABC','(ABC|MNO)', '('& concat(Product_Group,'|') &')')

This works But on Clear All.. There are some other values getting selected.. Cant figure why thats happening.

Thanks.

Gysbert_Wassenaar

Try this:

=if(Product_Group='ABC','(ABC|MNO)', if(GetSelectedCount(Product_Group), '('& concat(Product_Group,'|') &')'))

It will prevent selecting all values in Product_Group when clearing all values.


talk is cheap, supply exceeds demand