Error when modifying an array in the rule input, it only happens on the site

Hello, I have a "little" problem.

I have an array that I want to modify using a! save, inside my foreach. Everything works fine on the interface.

a!sideBySideItem(
                      item: a!buttonArrayLayout(
                        buttons: {
                          a!buttonWidget(
                            label: "",
                            icon: "trash-o",
                            size: "SMALL",
                            width: "MINIMIZE",
                            style: "DESTRUCTIVE",
                            loadingIndicator: true,
                            saveInto: {
                              a!save(
                                target: ri!moneyAccounts[fv!index].isDeleted,
                                value: true()
                              ),

                            }
                          ),
                          a!buttonWidget(
                            label: "",
                            icon: "pencil-square-o",
                            size: "SMALL",
                            width: "MINIMIZE",
                            style: "PRIMARY"
                          )
                        },
                        align: "START"
                      ),
                      width: "MINIMIZE"
                    )

But when I want to use it on the site I get this error. Please help

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    HI ,

    Can you also describe how is this interface rendered on your site

    Is it through a parent interface / process model ?

    I believe you are using a parent interface and inside that you have not declared this rule parameter as a local variable.

    Eg. lets say your above code is in a rule say, rule!ABC which has a rule input ri!moneyAccounts

    then in your parent interface, you must declare a local variable for this rule input as well

    so, make sure you are calling this rule ABC in the parent interface something as

     rule!ABC(

         moneyAccounts: local!moneyAccounts

    )

Reply
  • 0
    Certified Lead Developer

    HI ,

    Can you also describe how is this interface rendered on your site

    Is it through a parent interface / process model ?

    I believe you are using a parent interface and inside that you have not declared this rule parameter as a local variable.

    Eg. lets say your above code is in a rule say, rule!ABC which has a rule input ri!moneyAccounts

    then in your parent interface, you must declare a local variable for this rule input as well

    so, make sure you are calling this rule ABC in the parent interface something as

     rule!ABC(

         moneyAccounts: local!moneyAccounts

    )

Children