Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kakani87
Specialist
Specialist

Pick & Match Instead of If Condition

Hi Folks ... can this expression be changed using Pick and Match instead of If conditions

if

(

(max(holiday_flag)=1 or max(sunday_flag)=1) and max(present_flag)=2

,

'qmem://<bundled>/BuiltIn/smiley1.png'

,

if

(

Max(present_flag)=2,

'qmem://<bundled>/BuiltIn/smiley1_g.png'

,

if

(

max(exclusive_livetrack_flag)=1,

'qmem://<bundled>/BuiltIn/smiley1_y.png'

,

if

(

(max(holiday_flag)=1 or max(sunday_flag)=1) and max(exclusive_livetrack_flag)=1

,

'qmem://<bundled>/BuiltIn/smiley3_r.png'

,

if

(

max(sunday_flag)=1,

'qmem://<bundled>/BuiltIn/plus_g.png'

,

if

(

max(biometric_abscent_flag)=1,

'qmem://<bundled>/BuiltIn/question_r.png'

)

)

)

)

)

)

stalwar1

tresesco

1 Solution

Accepted Solutions
marcus_sommer

You used multiple flag-fields and they seem not to be aligned to each other and therefore I think that your expression couldn't be improved very much but with some changes in the datamodel it could be possible.

This meant not just using a flag of 0 or 1 else to align the flags in a way that a:

rangesum/max/min/avg()

of your flags returned always an unique value which could then be used in a pick().

Maybe even easier might be to use a single flag-field to determine the various states of absence or presence.

- Marcus

View solution in original post

2 Replies
marcus_sommer

You used multiple flag-fields and they seem not to be aligned to each other and therefore I think that your expression couldn't be improved very much but with some changes in the datamodel it could be possible.

This meant not just using a flag of 0 or 1 else to align the flags in a way that a:

rangesum/max/min/avg()

of your flags returned always an unique value which could then be used in a pick().

Maybe even easier might be to use a single flag-field to determine the various states of absence or presence.

- Marcus

kakani87
Specialist
Specialist
Author

Thanks a lot Marcus for the suggestion