We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

philb1208
Posts: 44
Joined: Thu Jul 04, 2019 3:24 pm

Conditional combo box/next button

Hi,

I found this topic viewtopic.php?t=17248 on the forums (sorry it's been a log time since i used BBcode on forums, not sure how to format the URL). The user in this topic is trying to disable the "Next" button on a dialogue depending on which option is selected from a dropdown/combo box.

I have a section in my installer where i collect some information (i use this as tags for system monitoring) - The list is prepopulated but the first option is "Please Choose One". I want to disable the "Next" button when this option is enabled. I've created a control condition which says if

SYSTEM_TYPE_TAG = "Please Select One" then disable the button.

This disabled the next button as expected, but when i select a valid option the "Next" button is still disabled. How can i do this so that when any other option is selected the "Next" button is renabled?

The "Please Select One" option is the default option, so the "Next" button is disabled until a user selects a valid option.

I added SYSTEM_TYPE_TAG set to equal to nothing and enable the button hoping it would use whichever option (except for Please Choose One) had been selected, however this just enables the "Next" button regardless of whether i pick a valid option or not.

I found if I add a condition for each tag value it will work as intended, i have a lot of tag values though and the list will most likely grow so i would need to update this each time. I just wondered if there is a more efficient way of doing this?

Thanks,

Phil
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Conditional combo box/next button

Hello Phill,

Indeed, the "Control Condition" approach is the correct one.

So, basically, from my understanding, the logic here is as it follows:

if

Code: Select all

SYSTEM_TYPE_TAG = "Please select one" 
then disable the "Next" button

otherwise enable it.

This "otherwise" can be translated to the following condition:

SYSTEM_TYPE_TAG property is different than "Please select one", which can further be typed as it follows:

Code: Select all

SYSTEM_TYPE_TAG <> "Please select one"
With that being said, could you please add another "Control Condition" to your dialog, with the action set to "Enable" and the condition specified above?

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
philb1208
Posts: 44
Joined: Thu Jul 04, 2019 3:24 pm

Re: Conditional combo box/next button

Hi Catalin, sorry for the delayed response. I had a slight issue with Windows updates, I've just got back to this.

I'm not sure if I missed something bu the first code block appears to be blank. Is this correct?

Edit: Sorry, I went back to my installer and had changed the controls, I have the following now:

SYSTEM_TYPE_TAG <> "Please Select One" = enable
SYSTEM_TYPE_TAG = "Please Select One" = Disabled

This looks to have solved it straight away! Thanks :D
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Conditional combo box/next button

Hello Phill
I'm not sure if I missed something bu the first code block appears to be blank. Is this correct?
Indeed, for some reason I have forgotten about that. I apologize for that. I have edited it now.

You are always welcome.

I am glad I could help.

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

Return to “Building Installers”