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 Reply
  • +1
    Certified Lead Developer
    in reply to brayanm0001

    This explains what you see in your error message.  From this parent contxt, you're passing the direct result of a query into the rule input, but then in the sub-interface, you're trying to save a new value into it.  The issue is that the new value does not have a proper location to save "up" into (such as a local variable). 

    Also I would caution you that even if you provide a local variable for it to save up into, this change will only be transient and will not affect the DB value unless you take specific steps to also save the new value into the DB.

Children
No Data