Hi everyone,
I’m working on a Classic Customization in the Order Entry screen. I’ve added:
- A checkbox (to indicate override reason is required)
- A combo box (with a list of predefined override reasons)
- An input field (for a custom reason if “Other” is selected)
Here’s what I’m trying to achieve:
- When the checkbox is checked → show the combo box.
- When the user selects “Other” from the combo box → show the input field for them to type a reason.
I tried using the Rule Wizard, but it doesn’t seem to work for this type of conditional logic.
private void CreateRowRuleOrderHedRepOverride_cEquals_True()
{
// Description: Render dropdown when checkbox checked
// **** begin autogenerated code ****
ControlSettings controlSettings1NorLake = new ControlSettings();
controlSettings1NorLake.SetStyleSetName("Default");
RuleAction norlakeOrderHed_ReasonCode_c = RuleAction.AddControlSettings(this.oTrans, "OrderHed.ReasonCode_c", controlSettings1NorLake);
RuleAction[] ruleActions = new RuleAction[] {
norlakeOrderHed_ReasonCode_c};
// Create RowRule and add to the EpiDataView.
RowRule rrCreateRowRuleOrderHedRepOverride_cEquals_True = new RowRule("OrderHed.RepOverride_c", RuleCondition.Equals, true, ruleActions);
((EpiDataView)(this.oTrans.EpiDataViews["OrderHed"])).AddRowRule(rrCreateRowRuleOrderHedRepOverride_cEquals_True);
// **** end autogenerated code ****
}