cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
swjpilot
Level 3

Double Quotes in variable from User input panel

Jump to solution
I am attempting to take user input from the simple user input panel in pre-installation, store that in an install anywhere variable and subsequently use that variable in a Modify Text file Search and replace later in the installation. The problem is that everytime I replace a value with data from a user input variable I have created using the simple input panel it places quotes around the data that is inserted in the the text file. The quotes appear to come from the input panel because I can pull values from the registry or other places and use them in the find and replace functions without getting quotes around the data. any help on getting rid of these quotes would be appreciated.
Labels (1)
(1) Solution
buzz3791
Level 3

I agree with @swjpilot that for a simple text input field InstallAnywhere returning a string surrounded by quotes is very annoying.  InstallAnywhere lacks default actions that can easily remove the quotes so now I have to write a custom plugin just to get my "simple" textfield input. ðŸ˜¡

View solution in original post

(5) Replies
MEinstaller
Level 7
Do you have quotes around the variable name in the User Input panel? eg. "$VAR$" You do not need to do that.

I have used this and have not had that problem.
Are you entering the value with quotes around it? :confused:
0 Kudos
swjpilot
Level 3
I have not placed quotes anywhere either when I am entering the value on the input panel nor in the XML file I am replacing the value in. I get the same results in each of the installation projects I am working on.
0 Kudos
swjpilot
Level 3
Found a work around.
If you use an advanced Input panel and set it up in the same way with only the one text field...posting the information to the exact same variable it works as expected with no quotes. but the simple input screen for whatever reason adds quotes.
Thanks to anyone who took a look!
pv7721
Level 20
I think it works this way... by design, just search "user input" in the manual and check the "Get User Input Panels":

Results Variable(s): The name of the InstallAnywhere variable that will store the results of the end-user's input. The default value for the Results Variable name is "USER_INPUT_RESULTS". The variable name of the Results Variable also forms the base name of additional InstallAnywhere variables that will be used to store individual end-user input choices from the end-user input panel. The convention for the naming of the additional variables is to append an underscore and an integer number to the end of the base name. The number, starting at one (1), increases by one (1) for each additional variable that is needed to store data. The number of additional variables derived from the Results Variable base name depends upon the Input Method/Component Type that you have selected for the panel, the choices made by the end-user at install time, and the number of values listed in Defaults.

Textboxes: The Results Variable is the base name for the values returned by the End-user Input panel. Entries in the textboxes will be returned in a comma-separated list surrounded by quotes and stored in the Results Variable. In addition, additional variables derived from the Results Variable will store the values in the individual textboxes. For example, if the Results Variable is $X$, and there are three textboxes populated with the following values when the end-user clicks Next during the install, Peter; Paul; and Mary, the following InstallAnywhere variables and values will exist:

$X$="Peter","Paul","Mary"

$X_1$=Peter

$X_2$=Paul

$X_3$=Mary

However, if only two values were inserted (Peter and Mary), the above example would appear in the following way:

$X$="Peter","","Mary"

$X_1$=Peter

$X_2$=

$X_3$=Mary
buzz3791
Level 3

I agree with @swjpilot that for a simple text input field InstallAnywhere returning a string surrounded by quotes is very annoying.  InstallAnywhere lacks default actions that can easily remove the quotes so now I have to write a custom plugin just to get my "simple" textfield input. ðŸ˜¡