Is there a mistake in this forEach to get all data by id. Using rule

a!forEach(
items: pv!id,
expression: a!save(
rule!Test_getDossierByDossierId(
dossierId: fv!item,
pagingInfo: a!pagingInfo(1, - 1)
),
pv!id
).data
)

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to R5127

    Then just run loop like below, don't do a!save. Because you just need data

    a!forEach(
      items: pv!id,
      expression: rule!Test_getDossierByDossierId(
        dossierId: fv!item,
        pagingInfo: a!pagingInfo(1, - 1)
      ).data
    )

    Or if you rule rule!Test_getDossierByDossierId accepts multiple type rule input dossierId then you don't need to run loop

    rule!Test_getDossierByDossierId(
      dossierId: pv!id,
      pagingInfo: a!pagingInfo(1, - 1)
    ).data

Children