h353655
Posts: 31
Joined: Wed Jun 21, 2017 2:51 pm

Setting default value of parameter to other parameter

My question seems to be lost, so forgive me if this is a duplicate.

I have two text fields in my installer. I'd like field2=field1 if field2 is empty. This should preferably also work in the command line.

Thanks in advance.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Setting default value of parameter to other parameter

Hello,

This could be implemented in the following way:

- Go to "Dialogs" page and create two new edit box controls on one of the dialogs. Change the properties associated with these by editing the "Property Name" field in the Properties Pane for each one. Let's use FIELD1 and FIELD2 property names.
- Select "Next" button and go to Its "Published Events". Create a new "Set Installer property" published event with the following configuration :

Code: Select all

Property: FIELD2
Argument [FIELD1]
Condition FIELD2=""
[code]
- Go to "Custom Actions" page and create a new "Set Instller Property" custom with sequence, placed after "Searches" in "Install Execution Stage", configured to set FIELD2 property to [FIELD1]. The Execution Stage condition should be enabled for Install : 
[code]
FIELD2=""
This step is necessary for silent installations.

Please take a look on the attached sample project, configured as described above.

Best regards,
Sorin
Attachments
Your Application.aip
(13.58 KiB) Downloaded 279 times
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”