Link to home
Start Free TrialLog in
Avatar of smods
smods

asked on

Infopath: Display various information in one box

Hi All,

I have an infopath form which users fill in various information in various fields.

What I want to do if possible to for each of those responses to populate in a text box hidden on the form.  So user fills in name, location, question but I want all of those details to appear in a single text box on the form formatted with a break between each answer.  Is it possible to do this?

So for instance in the box at the bottom it would show

Jon Smith

Staines

How do we do this?
Avatar of Robbie_Leggett
Robbie_Leggett
Flag of United Kingdom of Great Britain and Northern Ireland image

Try this. Go to Form options>Open and Save>Rules. Create a new rule. Add Action>Set a Fields Value.
Pick the field in question in the first box. Select the FX button for the second and choose add function. Select concat.
Where you need a double click to enter a field, do so for the first field and select the first field you want formatted. Once that is done, after the comma for the first field type the following EXACTLY:
" ", (that's "space",).
 
Then select the second field and repeat the process until you have all the fields.
 
:-)
Avatar of smods
smods

ASKER

Sorry,  that's my fault for not making it clear.

I need a carriage return between each line.  Not a space
ASKER CERTIFIED SOLUTION
Avatar of Robbie_Leggett
Robbie_Leggett
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of smods

ASKER

Thanks

As I have never really used infopath how/where do I insert this code? :D
Tool>Form Options>Programming>VSTA.
 
Have a look in there. You really want to read up on this before you do anything.
 
www.infopathdev.com is a great site.
 
:-)
Avatar of smods

ASKER

I'm sure it is as I originally found this through google but I don't have the time to learn about the programming aspect.  I can see how I need to change the code but where to put it is what I am struggling with.  I don't have that path you have mentioned.

I have tools > Programming > On Load Event / On Switch Views Event / On Context Change Event / On Sign Event / Microsoft Script Editor
You need microsoft script editor.
 
:-)