Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with multi-select field and execution step

SOLVED
Go to solution
Highlighted
b460
Regular Collector

Issue with multi-select field and execution step

Hi,

I have a multi-select field that has the option to be filled with up to 5 values.

Using this field I wish to evaluate which values have been selected and determine the outcome.

My logic is as follows:
- If value1 is selected then 'ASSESSMENT 1'
- If value2 or value3 or value4 or value 5 is selected then 'ASSESSMENT 2'
- Else if value1 and either of value1 to value5 is selected then 'BOTH ASSESSMENTS'

My SQL I have written in the execution step in the workflow is as follows:

SELECT
CASE
WHEN ('[REQD.P.SYSTEMS_IMPACTED]' = 'value1') THEN 'ASSESSMENT 1'
WHEN ('[REQD.P.SYSTEMS_IMPACTED]' IN (value2#@#value3#@#value4#@#value5)) THEN 'ASSESSMENT2'
ELSE 'BOTH ASSESSMENTS'
END
FROM
dual

Now the part that does not work is when I try to resolve the multi-select field with the values value2 to value5. How can I check that a value or multiple values are populated in a multi-select field (as shown below)?

WHEN ('[REQD.P.SYSTEMS_IMPACTED]' IN (value2#@#value3#@#value4#@#value5))
2 REPLIES
Solution

Re: Issue with multi-select field and execution step

Hi,

try this one

WHEN ('#@#[REQD.P.SYSTEMS_IMPACTED]#@#' LIKE '%#@#value2#@#%' OR
'#@#[REQD.P.SYSTEMS_IMPACTED]#@#' LIKE '%#@#value3#@#%' OR
'#@#[REQD.P.SYSTEMS_IMPACTED]#@#' LIKE '%#@#value4#@#%' OR
'#@#[REQD.P.SYSTEMS_IMPACTED]#@#' LIKE '%#@#value5#@#%' )
AND '#@#[REQD.P.SYSTEMS_IMPACTED]#@#' NOT LIKE '%#@#value1#@#%'

Kind Regards,
Michael
b460
Regular Collector

Re: Issue with multi-select field and execution step

Hi Michael,

I reworked the code to be:

WHEN ('[REQD.P.SYSTEMS_IMPACTED]' LIKE '%value2%' OR
'[REQD.P.SYSTEMS_IMPACTED]' LIKE '%value3%' OR
'[REQD.P.SYSTEMS_IMPACTED]' LIKE '%value4%' OR
'[REQD.P.SYSTEMS_IMPACTED]' LIKE '%value5%' )
AND '[REQD.P.SYSTEMS_IMPACTED]' NOT LIKE '%value1%'

and it worked fine!

Thanks for your help,
BC
//Add this to "OnDomLoad" event