Hello people, I have an issue while concatenating variables into a string, it used to work before but I don’t know what went wrong.
I’ll show you what I’m trying to achieve:
I have three variables
variable1: "this is a “+ variable2 +” of colour " + variable3
variable2: “house”
variable3: “red”
Instead of assigning the values this way, use 3 assign activities for each of the variable, then use message box to print the value.
Firstly , use assign activity for variable 2, then variable 3 and lastly for variable 1(as use are using variable 2 and variable 3 values in variable 1)
During the run time values will not get passed to it unless you call the variables just try by calling them separately it will get it out
Other wise try this "this is a “+ variable2 +” of colour " + variable3 in a message box
I tried "this is a “+ variable2 +” of colour " + variable3 in a message box, but it’s not what I need. Actually my objective is to use variables values taken from a excel sheet and use them in another variable.
You can’t do this in the defaults. variable1 and variable2 don’t have values yet when variable1’s default is processed. Take out the defaults, and do it with Assign activities in the correct order.
You can concatenate strings in the variable defaults, but not the way you did it here. You’re referencing other variables’ defaults before the default has been processed.
Just to be clear…you need not assign all in assignactivities
You can assign only variable1 in assign activities and give default values to variable 2 and 3…
That way you will get the display as expected
If you give variable1 also in default the problem
Is all the variables are initialized together and default values are not present so…var2 and 3 are empty…if you use assign for var1 then var2 and 3 as already have default values.they would be populated