Fundraising software for Macintosh and Windows


Removing Tabs and Returns From Exported Notes

Printable version of this document (79K, PDF)

 

This article explains a way to export donor notes that may include return or tab characters. These are the characters generated by the corresponding keys on your keyboard. These characters can cause problems in an export because they are commonly used to designate the boundaries between fields (tabs) and records (returns). While it may be sufficient to suggest that users donŐt enter these characters in notes, it is impossible to enforce that restriction. (Tabs canŐt be typed into a note field, because FUNDimensions changes the focus to another field when you type the tab key. However, they can appear in notes if text is pasted from another program.) A way to export notes is needed that is robust enough to eliminate these characters from output.

The method outlined here offers you the option of simply removing the characters, or substituting some other string of characters in their place. The core command is Replace String. It is similar to the Find and Replace command found in word processors. For our purpose, the syntax is:

Replace String (source; oldString; newString) -> String

This article assumes you are generating an export from the Report Editor. It is also possible to export donor notes using a command in the Advanced Reports Editor: see the User Manual for more information.

To remove tabs and returns from exported notes, do this:

1. In the Report Editor, double click the header row of the column that displays or exports a note field. The Formula Editor appears, with [Notes]Note in the entry area.

2. Change the formula to:

    Replace String(Replace String([Notes]Note;<>return;"");<>tab;"")

You must type the string above exactly as written. You will use parenthesis, brackets, semicolon, greater than (shift-period), less than (shift-comma), and straight quotes (shift-apostrophe). The formula will probably occupy 2 lines in the editor.

The formula above will remove return and tab characters, replacing them with nothing. To substitute some other characters, enter the string inside the quotes following the <>return or <>tab entries. For example,

Replace String(Replace String([Notes]Note;<>return;"; ");<>tab;"-")

would substitute a semicolon and space for every instance of a return and a dash for every instance of a tab.

3. Click OK to save your changes and close the Formula Editor.

4. Save the template by doing File > Save.

To try out your export, do this:

  1. While the template is open, choose Print Destination > Disk File.

  2. Choose File > Print. Enter a name for the file and choose a location for it, then click Save.

  3. Open the export file in a spreadsheet program, if available. Observe that, for notes with returns, no new record is generated, but instead the entire note stays in one row (record). Likewise, for notes with tabs, the note stays in the same column (field).

Comments on this article may be directed to the author, Frank Martin.