I am trying to create a dynamic grid that can add lines in a form. but I am getting an error

A Score Level 1
I am trying to create a dynamic grid that can add lines in a form. but I am getting an error inside the call and im not sure what it is pointing me to

Interface Definition: Expression evaluation error at function a!gridLayout [line 243]: Type Validation: com.appiancorp.core.data.Dictionary cannot be cast to com.appiancorp.core.data.Record


here is the code near the error it is inside an a!gridLayout

rows: {

if(isnull(ri!OtherDocumentAnalysis_CDT),
{},
{ rows: a!applyComponents(
function: rule!SB_RowEachforegulatoryfileingform(
taskItem_cdt: ri!OtherDocumentAnalysis_CDT,
index: _
),

array: 1 + enumerate(

count(

ri!OtherDocumentAnalysis_CDT
)
)
)
}

)

...

OriginalPostID-247922

  Discussion posts and replies are publicly visible

Parents
  • I think something like this for your applyComponents would serve you better.

    rows: a!applyComponents(
                                  function: rule!someFunction(someparameters)
                                  array:if(or(isnull(local!someArray), count(local!someArray) < 1), {}, 1+ enumerate(count(local!someArray)))
                        )
Reply
  • I think something like this for your applyComponents would serve you better.

    rows: a!applyComponents(
                                  function: rule!someFunction(someparameters)
                                  array:if(or(isnull(local!someArray), count(local!someArray) < 1), {}, 1+ enumerate(count(local!someArray)))
                        )
Children
No Data