Skip to main content
February 9, 2025
Solved

Interface error in a!save

  • February 9, 2025
  • 4 replies
  • 0 views

Not sure where i went wrong, gets below error, i understand error says i cannot use rule inputs in a!save, any suggestions to fix it:

Best answer by anthonyp8915

Is this interface a standalone interface, or is it being used as a component within a parent interface?

If it is a child interface, there’s a possibility that ri!cancel is being passed a constant from the parent interface. Since constants are read-only, attempting to save a value into ri!cancel will result in an error.

Similarly, if this interface is being called from a process model, check whether the process is passing a constant instead of a writable process variable.

Otherwise, could you provide some context of where and how this interface is used?

4 replies

February 11, 2025

Is this interface a standalone interface, or is it being used as a component within a parent interface?

If it is a child interface, there’s a possibility that ri!cancel is being passed a constant from the parent interface. Since constants are read-only, attempting to save a value into ri!cancel will result in an error.

Similarly, if this interface is being called from a process model, check whether the process is passing a constant instead of a writable process variable.

Otherwise, could you provide some context of where and how this interface is used?

February 15, 2025

I made ri!Cancel from constant to dynamic, this fixed it.

kishorej1999
February 11, 2025

Hi [mention:eef68e60a0d842ddadd0bbcaff199a4c:e9ed411860ed4f2ba0265705b8793d05] ,

First save your result in the local variable and use save with local, e.g., a!save(local!TR_Expense_details.hrApproval, now()), and then save this to the rule input a!save(ri!TR_Expense_details.hrApproval, local!TR_Expense_details.hrApproval).

stefanhelzle0001
February 11, 2025

This would not solve the problem.

When using the index() function for passing fields in variables to rule inputs, index() returns a copy of the data instead of a reference. Then this exact error happens.