You are here: Forums
 
  Forum  Discussions  WordFusion Beta  Mail merge substitute values during assembly (Post by Joseph on 3/05/2008 8:13:02 PM )
Previous Previous
 
Next Disabled
New Post 5/14/2009 12:10 PM
  Bruce
127 posts
10th Level Poster


Mail merge substitute values during assembly (Post by Joseph on 3/05/2008 8:13:02 PM )  


I have a question regarding making forms with wordfusion substitute values during assembly for example gender references:

like if i want to make a form for a long comprehensive document for my patients history , and i need wordfusion to automatically submit the gender of my patients. If i want to say that one of my male patients has a headache: for male "he has a headache", for female: "she has headache" which can do this easily by doing 1 choices field for the gender and 1 checkbox field for the HEADACHE..............but here is the problem , when the patient doesnt have a headache , so i will not mark the checkbox " Headache" ...but the field for the gender will be already marked " because there is a lot of He/She s in the Document ................so my question how can i link the 2 fields ...so if i didnt mark the HEADACHE checkbox ...the HE/SHE is disabled before it in the document

Here is what i get now in the document:
if patient has headache: he has headache
if patient doesnt have a headache: he

Here is what i want in the document:
if patient has headache: he has headache
if patient doesnt have headache:

 
New Post 5/14/2009 12:10 PM
  Bruce
127 posts
10th Level Poster


Re: Mail merge substitute values during assembly (Post by Joseph on 3/05/2008 8:13:02 PM )  

Please download the latest version of WordFusion before trying this. Note that the download will be smaller this time but it contains all the functionality of the previous downloads.

I have emailed you a form which shows you how you can do what you have described in WordFusion. You can use this as an example to modify your form.

These were the steps we followed:

1. Create a Choices Control with two values (Male , Female) and MergeText (he, she) this is done by right hand clicking the choices control, selecting “Properties” then selecting the “Items” tab.

2. Create a checkbox called “Headache” in the designer window.

3. Create the following script in the script window by clicking on the script tab in the designer (you can copy and paste from our example).

Public Sub Form_OnAssemble ()
fld.Headache.MergeTextTrue = fld.Gender.MergeText + " has a headache"
End Sub


This is how it works:

The form uses a check box field for Headache, which has a property called .MergeTextTrue, which merges to the document if the Headache field is checked. Using WordFusion scripting, I have set the value of .MergeTextTrue so that it will put “he has a headache” or “she has a headache” depending on the Gender field. If the Headache field is not checked, it will not merge anything into the document. So in the document you can just put the Headache field without the Gender field. The script runs when the document is assembled.

If you have any questions then feel free to let us know

 
Previous Previous
 
Next Disabled
  Forum  Discussions  WordFusion Beta  Mail merge substitute values during assembly (Post by Joseph on 3/05/2008 8:13:02 PM )
Copyright 2009 by Zumesoft Pty Ltd Privacy StatementTerms Of Use
Small width layoutMedium width layoutMaximum width layoutMaximum textMedium textSmall text