Sorting in the SAIL report is not working

Hi all,
We have created a report based on some criteria and it works fine.

However, for some reason, sorting doesn't work.

Finally, we figured out the cause but are facing a different issue now.

It gives me the following error:
The save target must be a load() variable, process variable, or node input (or a rule input passed one of those three). with() variables are reinitialized with each evaluation and therefore cannot be used as save targets.

I defined a variable within load() say local!myVar.

From within with() I'm setting a value to local!myVar and this keeps on changing depending on the selected criteria.

Down the rule, I'm trying to save the value of local!myVar with modified value and this is where it shoots the above error.

load
(
local!myVar,
with
(
local!myVar:customRule,
----
---
---
calling another rule by passing ustomeRule(local!a,local!b,local!myVar)

within this rule,
I'm trying to use
a!save(ri!myVar,some validation) [Fails he...

OriginalPostID-177004

OriginalPostID-177004

  Discussion posts and replies are publicly visible

Parents
  • As daniell said, first you have to remove the declaration / assignation inside with() ..
    with
    (
    local!myVar:customRule ..

    if you want to refresh the value after each evaluation, you have to implement a!save() in all the fields that you think will affect this filter .. Say if changing 3 out of 10 fields in your form will impact the myVar, then you have to implement a!save() in all 3 fields' saveInto ..

    Basically its either individual a!save() on each component or one generic definition inside with() .. both cannot co-exist ..
Reply
  • As daniell said, first you have to remove the declaration / assignation inside with() ..
    with
    (
    local!myVar:customRule ..

    if you want to refresh the value after each evaluation, you have to implement a!save() in all the fields that you think will affect this filter .. Say if changing 3 out of 10 fields in your form will impact the myVar, then you have to implement a!save() in all 3 fields' saveInto ..

    Basically its either individual a!save() on each component or one generic definition inside with() .. both cannot co-exist ..
Children
No Data