Expression Error on Data Output-Length of input and output values both matches,still seeing this error.

Please help me on this:

Node:Data Input values: 

=rule!RCO_QRY_getBaseloadRefIdByTransactionRefId(transactionRefId: pv!createCaseHelpers.case.transactionRefId,columns:{"baseRefId","transRefId"},isIndexIntoData: true)

Node- Data Output Value:

a!forEach(
pv!createCaseHelpers.case,
if(
rule!APN_isBlank(
fv!item.baseloadRefId
),
updatecdt(
cdt: fv!item,
fieldandvalues:{
baseloadRefId:{
index(
ac!baseTransMap.baseRefId,
wherecontains(
tointeger(fv!item.transactionRefId),
ac!baseTransMap.transRefId
),
null
)
}
}
),
fv!item
)
)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    The updateCdt function is a bit finnicky about making sure the array lengths of the updated properties of the CDT are the exact same length as the input CDT.  I'm unclear what the value of your initial query might be resolving to, but you should check, for example, that your index() function call is returning the right size array (consider that whereContains returns an array type whether or not returning a single value).

    I further suggest that you debug this in an empty Expression Rule editor, since you'll be able to try different possibilities faster.

    As a side note: i strongly encourage everyone to use the "Insert --> Code" function here when entering a code snippet, as the code box that provides both retains formatting as well as prevents the post from stretching way too long.

  • 1. Thanks Mike, i will debug starting with wherecontains functions.

    2. Follow the Code Snippet,sorry about it.

Reply Children