For Each Issue

Hi ,

local!lastRowDetails: a!forEach(
items: ri!testCdt,
expression:
segment: if(and(fv!item.aId=ri!tData_cdt.id ,
fv!item.tabId=ri!tData_cdt.tName,), fv!item,{})
)

 

This is returning 7 matching rows, but i want only the data of last matched row.

 

Can you you help me in that.

  Discussion posts and replies are publicly visible

Parents
  • HI

    Change according to your need
    you are collecting 7 rows,so max index is 7
    local!lastRowDetails[7]
    for n rows try this
    load(
    local!lastRowDetails: a!forEach(
    items: ri!testCdt,
    expression: if(
    and(
    fv!item.aId = ri!tData_cdt.id,
    fv!item.tabId = ri!tData_cdt.tName
    ),
    fv!item,
    {}
    )
    ),
    local!length: length(
    local!lastRowDetails
    ),
    local!lastRowDetails[local!length]
    )
Reply
  • HI

    Change according to your need
    you are collecting 7 rows,so max index is 7
    local!lastRowDetails[7]
    for n rows try this
    load(
    local!lastRowDetails: a!forEach(
    items: ri!testCdt,
    expression: if(
    and(
    fv!item.aId = ri!tData_cdt.id,
    fv!item.tabId = ri!tData_cdt.tName
    ),
    fv!item,
    {}
    )
    ),
    local!length: length(
    local!lastRowDetails
    ),
    local!lastRowDetails[local!length]
    )
Children