Skip to main content
September 19, 2023
Question

can we declare local variables inside a!foreach()

  • September 19, 2023
  • 3 replies
  • 0 views

can we declare  local variables inside a!foreach() inside expression rule 

    3 replies

    stefanhelzle0001
    Brainy
    September 19, 2023

    Yes

    rishikeshr4182
    September 20, 2023

    Yes, [mention:0591d80bf3a5406ebeb3855605fe90c0:e9ed411860ed4f2ba0265705b8793d05], we can do that,
    #For your reference, a small example.

    a!forEach(
    items: { 1, 2, 3, 4 },
    expression: a!localVariables(
    local!index: fv!item,
    a!forEach(
    items: { "A", "B", "C" },
    expression: concat(fv!item, local!index)
    )
    )
    )

    anmolv0003
    Participating Frequently
    September 20, 2023

    Anmol