Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I'm trying to create a trigger that will select certain values in one field if no value is selected in Product Filter and if User selects multiple values the condition will go to the else statement.
The general format for a search string mask is (AAA|BBB|CCC) and if we are selecting these values then it is working fine.
However, if any of the values have spaces (PRD AAA|PRD BBB|PRD CCC) , the search mask doesn't seem to work.
Below is the expression using in triggers:
=if(GetSelectedCount(PRODUCT_NAME)=0,MinString({<COMPETITOR_FLAG={'N'}>}PRODUCT_NAME),
'(' & getfieldselections(PRODUCT_NAME,'|') & ')')
Thanks in Advance
Thank you Nagaraj,
I tried the syntax and its is working fine. However, I tried with below logic and it seems to be working.
=if(GetSelectedCount(PRODUCT_NAME)=0,MinString({<COMPETITOR_FLAG={'N'}>}PRODUCT_NAME),'("' &Replace(GetFieldSelections(PRODUCT_NAME),', ','"|"') & '")')
Regards,
Jaswanth P
Hi Jaswanth,
I have not tested the below one but try
=if(GetSelectedCount(PRODUCT_NAME)=0,
MinString({<COMPETITOR_FLAG={'N'}>}PRODUCT_NAME),
'(' & Chr(34) & getfieldselections(PRODUCT_NAME, Chr(34) & '|' & Chr(34)) & Chr(34) & ')'
)
OR
=if(GetSelectedCount(PRODUCT_NAME)=0,
MinString({<COMPETITOR_FLAG={'N'}>}PRODUCT_NAME),
'(' & Chr(34) & getfieldselections(PRODUCT_NAME, '"|"') & Chr(34) & ')'
)
Thank you Nagaraj,
I tried the syntax and its is working fine. However, I tried with below logic and it seems to be working.
=if(GetSelectedCount(PRODUCT_NAME)=0,MinString({<COMPETITOR_FLAG={'N'}>}PRODUCT_NAME),'("' &Replace(GetFieldSelections(PRODUCT_NAME),', ','"|"') & '")')
Regards,
Jaswanth P