cancel
Showing results for 
Search instead for 
Did you mean: 

How to use "contains" function in router? I am getting error of expression failure

ruchi_pandey
New Contributor II

Hi guys,

I am trying to use router with diff data scenarios, where I have to give conditions like:
1)
($DIFF_REC_COUNT<0) && (_PIPELINE_NAME.contains(‘DI_AVT_DH_PERSON_TYPE_ODS’,‘DI_AVT_DH_PERSON_CITIZENSHIP_ODS’,‘DI_AVT_DH_PERSON_LANGUAGE_ODS’))

If its true, goto Success flow or

  1. ($DIFF_REC_COUNT<0) && (_PIPELINE_NAME.contains(‘DI_AVT_DH_PERSON_TYPE_STG’,‘DI_AVT_DH_PERSON_CITIZENSHIP_STG’,‘DI_AVT_DH_PERSON_LANGUAGE_STG’))

goto this flow.

But looks like this expression is not correct; hence I am getting error like:

Failure: Unexpected error occurred while evaluating expression: SC@7e0b949, Resolution: Please check your expression

Please suggest!

1 ACCEPTED SOLUTION

I solved this issue actually…
I gave this exp and it worked.

($DIFF_REC_COUNT<0) && (_PIPELINE_NAME.contains(‘PERSON_TYPE_ODS’)|| _PIPELINE_NAME.contains(‘PERSON_CITIZENSHIP_ODS’)|| _PIPELINE_NAME.contains(‘PERSON_LANGUAGE_ODS’) )

THanks for your quick response though… 🙂

View solution in original post

11 REPLIES 11

Wrap the whole expression in parenthesis and a NOT operator:

!($field002 matches "88017"|"88067")

heidi_andrew
Contributor

perfect. these little easy syntax cannot be found in the documentation! the hard ones, yes.