I have a need to display multiple updatedatable sections on one form, I am using

I have a need to display multiple updatedatable sections on one form, I am using the applycomponents function to do this, but it is not actually updating the values that i want to pass in. I recreated what I want with a very simple example:

rule 1:
=a!sectionLayout(
label: "Lorem Ipsum",
firstColumnContents: {
a!textField(
label: "Lorem Ipsum",
value: ri!saveValue,
saveInto: ri!saveValue
)
}
)

rule 2: (multiple sections)
=a!applyComponents(function: rule!TEST_section, array: ri!testSaves)

In this scenario when I enter data into the text field I would expect the values in testSaves to be updated, is this suppose to work?

OriginalPostID-141069

OriginalPostID-141069

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    alright, you should change your subrule to take the entire array, and then the specific index of the object that rule is modifying:

    lower rule:
    =a!sectionLayout(
    label: "Lorem Ipsum",
    firstColumnContents: {
    a!textField(
    label: "Lorem Ipsum",
    value: ri!saveValues[ri!index],
    saveInto: ri!saveValues[ri!index]
    )
    }
    )

    main rule call:
    =a!applyComponents(
    function: rule!TEST_lowerRule(
    saveValues: ri!testSaves,
    index: _
    ),
    array: 1 + enumerate(count(ri!testSaves))
    )
Reply
  • 0
    Certified Lead Developer
    alright, you should change your subrule to take the entire array, and then the specific index of the object that rule is modifying:

    lower rule:
    =a!sectionLayout(
    label: "Lorem Ipsum",
    firstColumnContents: {
    a!textField(
    label: "Lorem Ipsum",
    value: ri!saveValues[ri!index],
    saveInto: ri!saveValues[ri!index]
    )
    }
    )

    main rule call:
    =a!applyComponents(
    function: rule!TEST_lowerRule(
    saveValues: ri!testSaves,
    index: _
    ),
    array: 1 + enumerate(count(ri!testSaves))
    )
Children
No Data