Skip to main content
aishwaryap0266
November 22, 2022
Question

Getting error (Interface Definition: Expression evaluation error at function rule!PP_CreateExam [line 26]: Rule 'pp_createexam' has 2 parameters, but instead passed 0 parameters.)

  • November 22, 2022
  • 4 replies
  • 0 views

a!localVariables(
local!chooser:1,
{
a!columnsLayout(

What I did here is I created 4 different interfaces (Create New Exam", "Manage Exam","Attempt Exam","Exam Analysis) and now I want all these different interface inside one interface i.e The one I am working on which is facing this error. What I want is to use Radio button and when I click on 1st option I want the 1st interface(Create New Exam) to display and for option 2 the 2nd interface and so on.

How can I resolve this error or maybe other way to bring the interfaces in one single one?

Below is the code for the 5 the interface I am working on

columns: {

a!columnLayout(
contents: {
a!radioButtonField(
label: "Exam Module",
labelPosition: "ABOVE",
choiceLabels: {"Create New Exam", "Manage Exam","Attempt Exam","Exam Analysis"},
choiceValues: {1,2,3,4},
value: local!chooser,
saveInto:local!chooser,
choiceLayout: "STACKED",
validations: {}
)
}
)
}


),
a!cardLayout(
contents: {
rule!PP_CreateExam()
},
showWhen: local!chooser=1
),
a!cardLayout(
contents: {
rule!PP_ManageExams()
},
showWhen: local!chooser=2
),
a!cardLayout(
contents: {
rule!PP_AttemptExam()
},
showWhen: local!chooser=3
),
a!cardLayout(
contents: {
rule!PP_ExamAnalysis()
},
showWhen: local!chooser=4
)
}

)

4 replies

vinays024987
November 22, 2022

It is because you have declared 2 rule inputs in rule!PP_CreateExam() interface.

So you have to pass the parameters: rule!PP_CreateExam(ruleInput1 , ruleInput2),

You can make rule inputs on parent interface and pass as parameter.

aishwaryap0266
November 22, 2022

Hi, Thank You so much for replying.

What I want to achieve here is display the 5th interface on the site 

I created 2 rule inputs (cancel, PP_Exam) in the 5 the interface but the error persists, apart from that when I am trying to (Add Page) on the SITE Object and select an interface it is not allowing any interface which has rule input in it.

I did not understand your solution clearly, could you please make changes in the code and share if possible?

vinays024987
November 22, 2022

Yes you cannot plug interface with rule inputs on Site,

you can try: 

a!cardLayout(
contents: {
rule!PP_CreateExam(null,null)
},
showWhen: local!chooser=1
),