Customer Portal

Compare list with string

Comments 1

  • Avatar
    dpavlis
    0
    Comment actions Permalink
    Hi,

    The error is a result of trying to compare STRING with LIST of STRINGS - for equality - which of course does not work. What you need to do is to check whether the LIST contains your STRING.
    For this, the function containsValue() can be used.

    Your code could be re-written this way:


    for(integer i = 0; i < length($in.0); i++) {
    if(! containsValue(pkey, getFieldLabel($in.0,i)) {
    <do some operation>
    }
    }

Please sign in to leave a comment.