[wix-users] Setting Property based on a condition

Lewis Henderson henderso at opentext.com
Mon Sep 28 05:50:15 PDT 2015


Hi Sanket,

I believe your issue is that your condition is ...>txtUserId = ""<... where it should be
...>USERID = ""<...

You need to reference the property itself, not by the Id of the edit control.  I hope this clears things up.

				Lewis Henderson

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Sanket Panchamia
Sent: Monday, September 28, 2015 6:56 AM
To: WiX Toolset Users Mailing List
Subject: [wix-users] Setting Property based on a condition

Hi,

I am running into a case where i need to set some property based on what value is entered in the Custom Dialog.

So i have a EditBox (for User Id)  in my dialog. The next dialog shows what values i entered in this dialog for verification.

The condition is that if this edit control is left blank, the user dialog should be set to "UNKNOWN"

I have the following code:

<Control Type="Edit" Id="txtUserId" Width="111" Height="15" X="184" Y="146"
Property="USERID">

I tried to code this condition in the "Next" button control but it doesnt work as expected. It always sets the value to "UNKNOWN"
This is what i have in the "Next" button control

<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17"
Default="yes" Text="!(loc.WixUINext)">
                  <Publish Property="USERID" Value="UNKNOWN">txtUserId = ""</Publish>
                </Control>

Seems like i am doing something very basically wrong.

Thanks
--
Regards
Sanket Panchamia
+91-9742836299

<https://twitter.com/p_sanket>  <http://www.facebook.com/spanchamia>
<http://www.linkedin.com/in/psanket>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list