You need to sign in to do that
Don't have an account?
OFA_Schlicksup
Concatenating values into a Variable
I seem to remember learning this at some point but cannot find it. How would you (if possible) concatenate two values (ideally two input fields) into a variable?
Example Case - I have a Form Question for State and a Form Question for Expense Type. I want the Variable to grab the State value and the Expense Type value and concatenate so I can allocate that to a text field. Similar to merge fields I guess.
Can this be done?
Thanks for the direction. In case anyone else stumbles upon this, to clarify my eventual solution:
All Answers
Hi,
You can do this by using "Assignment" Element.
just create a temporory varible, and add all the User inputs to these variable through Assignment varible.
thanks
To be more specific, use the "add" operator
Thanks for the direction. In case anyone else stumbles upon this, to clarify my eventual solution:
I am dealing with a similar issue, but I cant seem to get the varSPACE variable to respect the space. I want the following format: var1 - var2. I've tried the Assignment with three variables, but the varSPACE variable doesn't seem to work so I get var1-var2. Did you do anything other than hit the space bar in the default value field for varSPACE?
No, I did nothing other than hit the space bar in the default value field for varSPACE. If you are trying to set " - " all in a single variable, it may choose to read that simply as "-" (ignoring space as it does in APEX). It may be necessary to split that into two variables:
And then use the Add function in the Allocator as var1 varSPACE varDASH varSPACE var2.
Thanks for the reply. I tried that too, but it didn't work for me. For some reason it is ignoring the space I set in the varSPACE variable. (Perhaps Cloud Designer doesn't respect the space variable in the same way.)
I haven't played with the Cloud Designer yet (from what I hear, it's slicker but offers less functionality), so I have no further insight. Maybe add a space at the end of var1 and at the beginning of var2? Just guessing at this point. It is frustrating to get stuck with some functionality that seems so obvious.
Similar issue as basicquestoins - trying to get a space between first and last name to populate a variable for "FullName". I tried assignments, variables, constants... none of them worked, the space never rendered.
Here's what worked for me: I added an extra Screen, and in that Screen I added Display Text which I labeled "FullName". In the Display Text, I added the first and last name screen input fields with a space between them.
Now, "FullName" appears in Resources as a Screen Output Field. I can access and render the FullName in the Flow with the desired result (a space between the first and last names).
I did not connect the extra Screen to any other Elements in the Flow. Seems strange that it works without being connected. But it does.
Using a text template, as Rajaram suggests here worked best for me.
http://boards.developerforce.com/t5/Visual-Workflow/concatenate-values-with-spaces/m-p/443711/highlight/true#M478
The advice given by OFA_Schlicksup was very useful, however I experienced the same issue as some other users, entering the space in the variable field did not work it was just ignored.
After some perseverance I found that entering the value of the space as ASCII worked.
Holding down "Alt", typing 255 on your numeric keypad, then releasing "Alt."
I then added the variable varSPACE into a text template and using the assignment "Add" generated the required space.