Skip to main content
Question

How to use conditional operator in output parameter expression of a business rule

  • January 4, 2024
  • 1 reply
  • 66 views

Forum|alt.badge.img+8

How to use conditional operator in output parameter expression of a business rule.

 

I use the conditional operator like “task.user_def8!=6883?KABEL_C:FIBERKABEL_C”. But getting the error

“The expression 'task.user_def8!=6883?KABEL_C:FIBERKABEL_C' contains unexpected syntax. The operation '!=' cannot be performed between operands 6883 and 6883.”

 

 

Any idea why it is failing?

1 reply

SAMLK
Hero (Partner)
Forum|alt.badge.img+14
  • Hero (Partner)
  • January 5, 2024

Hi @TDCMANIRUL 

You should wrap your user_def8 value within double quotes as the user_def8 is a string property in the metadata. 

Expression should be:

task.user_def8 != “6883” ? “KABLE_C” : “FIBERKABLE_C”