Expression evaluation error: Syntax error. Details: Expression evaluation error at function 'if' parameter 2 [line 164]: Keyword and non-keyword arguments must not be mixed. Used in: INO_WidgetAgentBreakTimeMonthlyDrilldown. why?

rule!INO_WidgetAgentBreakTimeMonthlyDrilldown(
                  if(
                    ri!selectedDateRange = cons!INO_DATE_RANGE_16_WEEK,
                    daily16WeekAgentTaskProduction: ri!daily16WeekAgentTaskProduction,
                    taskProdutionList: ri!dailyAgentTaskProduction
                     ),    
                  selectedMonth: local!selectedbreakTimeMonth,
                  selectedYear: local!selectedbreakTimeYear,
                  selectedWeek: local!selectedbreakTimeWeek,
                  selectedDay: local!selectedbreakTimeDay,
                  dateCategoryList: local!categoryList,
                  selectedDateRange: ri!selectedDateRange
                ),

the error is coming for this If condition. Please tell me how to solve?

  Discussion posts and replies are publicly visible

Parents
  • In Appian Rules and Interfaces can have zero, one or more rule inputs (parameters that you pass to the rule/interface). You can pass them "by position" (that is, not explicitly naming the parameters - keywords - or you can pass them by name -by keyword (the latter is best practice as it protects you from changes where parameters are re-ordered or deprecated). What you can't do is mix these two models, which is the error being called out.

    Coming to your code - you are providing names for all the parameters except the first one, which is being derived in your if() statement. There's nothing wrong in using na if() statement, you just need to assign it the correct parameter name.

Reply
  • In Appian Rules and Interfaces can have zero, one or more rule inputs (parameters that you pass to the rule/interface). You can pass them "by position" (that is, not explicitly naming the parameters - keywords - or you can pass them by name -by keyword (the latter is best practice as it protects you from changes where parameters are re-ordered or deprecated). What you can't do is mix these two models, which is the error being called out.

    Coming to your code - you are providing names for all the parameters except the first one, which is being derived in your if() statement. There's nothing wrong in using na if() statement, you just need to assign it the correct parameter name.

Children
No Data