Hi,
"Expression evaluation error [evaluation ID = c3662:90d03] in rule 'bc_frm_addasset' at function a!dropdownField [line 114]: A null parameter has been passed.".
An user cannot edit an asset when an UoM is deactivated. For eg. if Meters is deactivated in UoM reference table, then an user trying to edit an asset with 78 Meters as quantity can't edit the asset as it throws an error.
So I am trying to use intersection function but getting the above error. Any suggestions how to fix this?
TIA
a!dropdownField( label: "Unit of Measure", labelPosition: "ABOVE", placeholder: cons!BC_TEXT_PLACE_HOLDER_SELECT_VALUE, choiceLabels: property( local!unitOfMeasurementList, "description", null ), choiceValues: property( local!unitOfMeasurementList, "measureId", null ), value: intersection(tointeger(ri!asset.unitOfMeasureId),tointeger(local!unitOfMeasurementList.measureId)), saveInto: { ri!asset.unitOfMeasureId }, required: true, validations: {} )
Discussion posts and replies are publicly visible
A drop down field cannot show a value which is not available in choiceValues.
You will need to add some extra logic to check whether the previously selected UoM is still available. Discuss with your team how to handle this case and implement accordingly.
Ok. Thanks, Stefan.