Skip to main content
July 22, 2024
Question

getting error Rule which has 1 parameters, but instead passed 5 parameters.

  • July 22, 2024
  • 4 replies
  • 0 views

Hi 

When i am trying to access one particular interface in dashboard options getting the error like below could you please suggest on it 

Error:

Error Evaluating UI Expression

Expression evaluation error [evaluation ID = f4ac9:0c850] in rule 'amd_pendingtaskgrid' (called by rules 'amd_dashboard' > 'amd_dashboard_requests') : Rule 'CS_joinassigneearray' has 1 parameters, but instead passed 5 parameters.

a!gridTextColumn(
label: "Assigned To",
field: "c23",
data: if(
local!datasubset.totalCount = 0,
{},
apply(
rule!CS_joinAssigneeArray,
local!datasubset.data.c23
)
),
alignment: "LEFT"
),

code in rule!CS_joinAssigneeArray:

joinarray(rule!CS_getTaskOwnersNames(ri!assignees)," | ")

in data local variable we are getting process report in that one particular column called Assigned to details we are getting and passing that to rule available in apply condition. Tried checking in process report in that column to check if there were any more parameters data passed but didn't able to traceback could you please suggest on this 

4 replies

stefanhelzle0001
Brainy
July 22, 2024

Could it be that this is a lists in list problem? Your c23 column contains a list of lists of assignees. When you pass that into apply, which you seem to prefer over a!foreach() for whatever reason, you end up passing this nested construct to that expression.

July 22, 2024

Yes it has lists in list like a group was providing as rule input to assignees sometimes to that query rule, so the possible solution for this should be replacing apply with foreach to handle this right could you please confirm

stefanhelzle0001
Brainy
July 22, 2024

Which Appian version do you use? Apply() and a!gridTextColumn() are deprecated.

I use a!foreach in that exact scenario.