Error Evaluating UI Expression Expression evaluation error in rule 'vfm_addvehicleform' at function a!dropdownField [line 18]: A null parameter has been passed.

I'm running through Instructions as described in the course. I have created the site and when launching the site I get this error "Error Evaluating UI Expression Expression evaluation error in rule 'vfm_addvehicleform' at function a!dropdownField [line 18]: A null parameter has been passed." but I haven't created an expression rule 'vfm_addvehicleform', thus where should i look for this?. 'a!dropdownField [line 18]' I have also checked this in the contents interface and the line 18 is a boolean value. Thus I request to provide help to solve this. 

The below is the code for form interface

=a!formLayout(
label: "Add Vehicle to Fleet",
instructions: "",
contents: {
a!columnsLayout(
columns: {
a!columnLayout(
contents: {
a!dropdownField(
label: "Category",
labelPosition: "ABOVE",
placeholderLabel: "--- Select a category ---",
choiceLabels: {"Small", "Economy", "Large", "Luxury"},
choiceValues: {"small", "Economy", "Large", "Luxury"},
value: ri!category,
saveinto: ri!category,
showwhen: true,
required: true,
validations: {}
),
a!textField(
label: "Make",
labelPosition: "ABOVE",
placeholder: "Make of the Vehicle",
value: ri!Make,
saveInto: ri!Make,
refreshAfter: "UNFOCUS",
required: true,
validations: {}
),
a!textField(
label: "Model ",
labelPosition: "ABOVE",
placeholder: "Model of the Vehicle",
value: ri!Model,
saveInto: ri!Model,
refreshAfter: "UNFOCUS",
required: true,
validations: {
null
}
),
a!textField(
label: "License Plate",
labelPosition: "ABOVE",
placeholder: "License plate no.",
value: ri!VehicleLicensePlate,
saveInto: ri!VehicleLicensePlate,
refreshAfter: "UNFOCUS",
required: ri!VehicleLicensePlate=7,
validations: {}
),
a!fileUploadField(
label: "Picture",
labelPosition: "ABOVE",
target: cons!VFM_VEHICLES_IMAGES_FOLDER,
value: ri!Image,
saveInto: ri!Image,
validations: {}
)
}
),
a!columnLayout(
contents: {
a!integerField(
label: "Mileage",
labelPosition: "ABOVE",
placeholder: "Mileage of a Vehicle",
value: ri!Mileage,
saveInto: ri!Mileage,
refreshAfter: "UNFOCUS",
required: ri!Mileage> 100000,
validations: {}
),
a!paragraphField(
label: "Condition",
labelPosition: "ABOVE",
placeholder: "Condition of the Vehicle",
value: ri!VehicleCondition,
saveInto: ri!VehicleCondition,
refreshAfter: "UNFOCUS",
required: true,
height: "MEDIUM",
validations: {}
)
}
)
}
)
},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidgetSubmit(
label: "Submit",
saveInto: {},
style: "PRIMARY"
)
},
secondaryButtons: {
a!buttonWidgetSubmit(
label: "Cancel",
value: true,
saveInto: ri!cancel,
style: "NORMAL",
skipValidation: true
)
}
),
validations: {}
)

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer
    When it says "Expression evaluation error", it's not necessarily talking about an *expression rule*, it just means that there's some error in the expression (i.e. rule or interface code). Typically I'd expect the error from your screenshot to be shown when the dropdown field receives a null value and there's no placeholder label set, but what you have set seems like it should be correct. You might want to verify the data type of ri!category though.
Reply
  • +1
    Certified Lead Developer
    When it says "Expression evaluation error", it's not necessarily talking about an *expression rule*, it just means that there's some error in the expression (i.e. rule or interface code). Typically I'd expect the error from your screenshot to be shown when the dropdown field receives a null value and there's no placeholder label set, but what you have set seems like it should be correct. You might want to verify the data type of ri!category though.
Children