Radio Button Not Updating Save Value

Certified Senior Developer

I have a radio button that is defined as follows:

a!radioButtonField(
	label: "",
	labelPosition: ri!labelPosition,
	choiceLabels: {
		"kg",
		"lbs"
	},
	choiceValues: {
		1,
		0
	},
	value: ri!weightUnit,
	saveInto: {
		ri!weightUnit,
		a!save(
			local!BMI,
			rule!INS_RULE_BMICalculator(
				height: ri!height,
				weight: ri!weight,
				heightUnit: ri!heightUnit,
				weightUnit: ri!weightUnit
			)
		)
	},
	showWhen: not(
		ri!readOnly
	),
	choiceLayout: ri!choiceLayout
)

When I change the value from kg to lbs, the value of local!BMI is updated.  But, when I switch back to kg, it's not updated, when it should be.  I've tried testing the INS_RULE_BMICalculator with the values stored in the rule inputs, and it works fine. Does anyone have any ideas as to what I could do differently to get the local!BMI variable to update any time the value of this radio button field is changed?

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data