Custom DocX Directory¶
This help article gives you instructions for customizing your own directory using one of our 3 directories as a template. The basics are this:
Download one of the directory templates - Step 1
Modify it using the replacement codes and taking note of the requirements below - Step 2
Upload it to our servers - Step 3
Add it to Custom Reports in Special Content - Step 4
Please follow these instructions very carefully.
- Step 1
Download one of our standard directory templates. This will be a Microsoft Word .docx file.
To download the templates, decide which of the following directories you want: - Picture Directory 24 per page - Picture Directory 4 per page - Family Picture Directory 12 per page
Copy the link below that is associated with the directory you want.
Paste it into a browser.
Change `yourchurch` to the actual name in your church’s TouchPoint URL.
Click `return/enter` to download the template.
https://yourchurch.tpsdb.com/content/touchpoint/templates/picturedir24.docx
https://yourchurch.tpsdb.com/content/touchpoint/templates/picturedir4.docx
https://yourchurch.tpsdb.com/content/touchpoint/templates/fampicturedir12.docx
- Step 2
Open the document and modify it adding your own layout and special replacement codes.
Important: See the following sections below - Requirements, Replacement Codes that can be used in this document, and Including Optional Lines.
When finished, save the document on your computer.
- Step 3
You need to upload this to our servers using the following instructions:
Go to your people record and select the Toolbar > envelope icon > Create/Edit Saved draft.
Select any template. It does not matter, because you are only using it as the vehicle to upload the document.
Click in the body of the email, then click the plain link icon (not the gold link), and then click on the Upload tab.
Click Choose File, find your document on your computer and double-click to select it. Then click the Send it to the Server button.
Click OK. This will place the URL in the body of the email.
Copy that link and paste it in a text file where you can access it or make sure it is in your clipboard. Then you can discard this draft.
Caution
When you copy the link for your upload, be sure to include -
https://
- Step 4
Now you will add this to the Custom Report in Special Content using xml following these specific instructions:
Go to Administration > Setup > Special Content and select the Text Content tab and then select Custom Reports.
Scroll to the bottom of the list of Custom Reports and insert a line just above the closing tag. The closing tag is </CustomReports>
Enter a name for your directory: <Report name=”Picture4Directory” where the text displayed in quotes will be the name you want to display in the custom reports menu.
Next, enter type=”URL” because the type of report will be URL.
Then enter this text - url=”/Reports/DocXDirectory/@qid?filename=YourFileNameHere with the actual filename (after the = sign) being whatever you choose to call it. Follow the file name with this text &template=.
The template will be the URL for the document you uploaded. So, after the = sign paste the URL you previously copied when you uploaded your document in Step 3. This time, you will include the .docx extension that is be part of the URL.
At the end of the URL add this text ” />.
Click Save Changes.
Your addition to the Custom Report file will look like this:
<Report name="Picture4Directory" type="URL" url="/Reports/DocXDirectory/@qid?filename=Picture4Directory&template=https://c4265878.ssl.cf2.rackcdn.com/MyChurch.1802271201.Picture4Directory.docx" />
Note that there is a space between “Picture4Directory” and type and another one between “URL” and url.
Caution
If, when saving the Custom Report, you get a message that there is a problem with the XML file,
double-check your code and especially the quotation marks.
Make sure you are using the straight type like this: "
and not
the normal curly quotation marks you would use in Word.
If you copy the code from this article and paste it into your file, you should not have any problems.
If you type the code in Text Edit or another text editing program and plan to copy and paste it into the Special Content file, be sure your preferences are using Plain Text instead of Rich Text.
Now your custom directory will be available from the blue Toolbar Toolbar > code icon > Custom Reports. See more about using the Custom Directory below.
Requirements¶
The docx file must have a single table with a single row in it. That row can have one or more cells in it where each cell will be for a different person. You can nest a table inside a single cell if your design requires that. Each cell in that one row must be identical. So typically you would construct the first cell then copy and paste that cell’s contents into the other cells on the row.
Replacement Codes¶
In addition to any of the normal replacement codes used for email, you can use the following special purpose replacement codes.
The following can be inserted into an email to verify someone’s personal information, or can be used in confirmations, such as Donation Confirmation emails. They can also be used in these DocX Directories.
{familyname}
If there is no spouse, it will be the name of the individual (same as {name} above)
If the CoupleName extra value field exists on the family record, this will be used
If the lastname of the Spouse is not the same as the head of household, the result will be something like “Jim Sutton & Linda Thompson”
Otherwise, it will be something like “Jim & Linda Sutton”
{familytitle}
If there is a FamilyName extra value field on the family record, this will be used
Otherwise, it will say something like “The Sutton Family”
{lastname}
The last name of the individual
{firstnames}
This is typically used when you are creating a family directory where the {familytitle} is used as a header over the family.
If there is no spouse, it will be the preferred name (goesby or first) of the individual
If the lastname of the Spouse is not the same as the head of household, the result will be something like “Jim & Linda Thompson”
Otherwise it will be something like “Jim & Linda”
{addr}
The complete mailing address on multiple lines.
{bday}
This returns a birthdate or blank if none is available.
If you just use
{bday}
, it will return something like “Aug 16”If you use something like
{bday:Birthday: _M/d/yy_}
, it will return something like “Birthday: 8/16/52”.
Every thing beyond the first
bday:
is the text that will be printed.What is between the two underscore characters is the format for the birthdate. That is a special replacement code inside this replacement code.
{anniversary}
This returns an anniversary date or blank if none is available.
This replacement code works the same way as
{bday}
above.{email}
This returns the email address of the individual.
If you just use
{email}
, it will return the email address of the individual.If you use something like
{email:_first_: _addr_}
, it will return something like “Jim: jamessutton2@gmail.com”
{spemail}
This returns the email address of the spouse, if any.
This works the same way as
{email}
above.{phone}
This will return the Home Phone number.
If the Home Phone is empty, a blank is returned.
If the individual has DoNotPublishPhones checked, a blank is returned.
If you just use
{phone}
the formatted phone number is returned.If you use something like
{phone:H _number_}
, it will return something like “H 901-758-1888”.
{cell}
This will return the individual’s Cell Phone number.
If the Cell Phone is empty, a blank is returned
If the individual has DoNotPublishPhones checked, a blank is returned.
If you just use
{cell}
the formatted phone number is returned.If you use something like
{cell:C _number_}
, it will return something like “C 901-489-0622”.If you use something like
{cell:C _first _number_}
, it will return something like “C Jim 901-489-0622”.
{spcell}
This will return the spouse’s Cell Phone number.
This works the same way as
{cell}
above.{spouse}
This will return the spouse’s name, “first last”
If there is no spouse, nothing is returned.
If you just use
{spouse}
only the name is returned.If you use something like
{spouse:Spouse: _name_}
, it will return something like “Spouse: Linda Sutton”
{kids}
This will return a comma separated list of Kids first names.
If there are no children, nothing will be returned.
If you use just
{kids}
it will look something like “Susan, Bobby, Tammy”If you use something like
{kids:Children: _names_}
, it will look something like “Children: Susan, Bobby, Tammy”.
{pic width height}
This will return the individual’s picture of a specific size.
You must include decimal number of inches for both width and height.
If there is no picture, it will return nothing.
If you use something like
{pic .65 .97}
, the picture will be sized exactly .65 inches wide by .97 inches tall.
{fampic width height}
This will return the family’s picture of a specific size.
This works the same way as
{pic
above.
Including optional lines in the output¶
The replacement codes that allow you to include text after a colon
(as in {kids:_names}
) can include a line break like so:
{familyname}
{kids:_names_
}{phone}
This means that if there are no kids, no space (line) will be in the output. So in the above case, with no kids, the phone number would start immediately below the familyname where the kids would normally show up.
Use the DocX Directory¶
- Step 1
Create and save a search in Search Builder that will return those that should be in the directory. If this is a family directory, just select only the head of household. And you can limit the search to just those who have a Family Picture on their record with the HasFamilyPicture condition.
- Step 2
Once you have the search results, go to the blue Toolbar > code icon and select the new Custom Directory you created. It will be located under Custom Reports.
This will open in Word. Use the Print function in Word to print the directories.
Note
You can also run this directory for an individual Organization or a Tag.