Is there a way to extract the interfaces out of the list returned when we do an a!applyComponents?

Is there a way to extract the interfaces out of the list returned when we do an a!applyComponents?

For example, I'm using the choose() function with an a!applyComponents like this:

choose(
local!currentStep,

rule!interface1(),

a!applyComponents(
function: rule!interfaceLoop(index: _, array: ri!array),
index: _,
arrayVariable: local!itemsToken),

rule!interface6()
)

But when using the applyComponents here it's evaluated as:

choose(
local!currentStep,
rule!interface1(),
{
interfaceLoop(index: 1, array: ri!array),
interfaceLoop(index: 2, array: ri!array),
interfaceLoop(index: 3, array: ri!array),
interfaceLoop(index: 4, array: ri!array)
},
rule!interface6()
)

Is there a way to extract the interfaces returned by the a!applyComponents so if local!currentStep=3, it would return the interfaceLoop(index:2, array:ri!array) instead of rule!interface6() ?

OriginalPostID-221284

OriginalPostID-221284

  Discussion posts and replies are publicly visible

Parents
  • This almost works, but what if we have a situation where rule!interface1() contains an array of components we want to display together, or we want to display different interfaces grouped together?

    For example:

    fn!index(
    {

    {
    a!sectionLayout(title: "display section title for interface 1"),
    rule!interface1()
    },
    a!applyComponents(
    function: rule!interfaceLoop(index: _, array: ri!array),
    index: _,
    arrayVariable: local!itemsToken
    ),
    rule!interface6()
    },
    local!currentStep,
    null
    )
    }
    )

    When we go through this interface it would show:
    local!currentStep=1: a!sectionLayout(title: "display section title for interface 1"),
    local!currentStep=2: rule!interface1(),
    local!currentStep=3: rule!interfaceLoop(1, ri!array)



Reply
  • This almost works, but what if we have a situation where rule!interface1() contains an array of components we want to display together, or we want to display different interfaces grouped together?

    For example:

    fn!index(
    {

    {
    a!sectionLayout(title: "display section title for interface 1"),
    rule!interface1()
    },
    a!applyComponents(
    function: rule!interfaceLoop(index: _, array: ri!array),
    index: _,
    arrayVariable: local!itemsToken
    ),
    rule!interface6()
    },
    local!currentStep,
    null
    )
    }
    )

    When we go through this interface it would show:
    local!currentStep=1: a!sectionLayout(title: "display section title for interface 1"),
    local!currentStep=2: rule!interface1(),
    local!currentStep=3: rule!interfaceLoop(1, ri!array)



Children
No Data