jstuardo
Posts: 87
Joined: Mon Nov 09, 2015 10:44 pm

Is it possible to change control value based on condition?

Hello,

I have a checkbox that is initially checked but based on a condition of other control, the checkbox should be unchecked. Is that possible?

Control condition only has these options:
Control Condition.png
Control Condition.png (3.88 KiB) Viewed 2291 times
I can only hide/show or enable/disable.

Kind regards
Jaime
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Is it possible to change control value based on condition?

Hello Jaime,

Unfortunately, that can not be achieved through a control condition.

However, that can be easily achievable through the checkbox's property. As you may know:

- checkbox = checked ==> checkbox's property has a default value

- checkbox = unchecked ==> checkbox's property does not have a value (is empty)

with that being said, in order to uncheck a checkbox based on a condition, you can use a "Set installer property" control event, as it follows:

Event: Set installer property value
Property: CHECKBOX_1_PROP (or the name of your property, if you have changed it)
Argument: {}
Condition: your_condition


This way, if the condition is evaluated as true, the checkbox's property will be set to empty value, therefore unchecking the checkbox.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”