[wix-users] Setting Property based on a condition

Sanket Panchamia psanket at gmail.com
Mon Sep 28 03:55:59 PDT 2015


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>


More information about the wix-users mailing list