7 Replies Latest reply on May 17, 2012 12:27 PM by Sorbsbuster

    Char(9) (tab) does not export

    JeffBorg

      Title

      Char(9) (tab) does not export

      Post

       

      I just figured out the Char() function, and every character I test exports fine, except the one I need, which is the tab character (Char(9)). It always comes out as a space character. 

      Have spent hours trying different things. Am tired of my manual workarounds. 

      The application du jour is to make a calculated field that rounds up several input fields and puts a tab between each, so that exporting to Excel may be faster and easier.

      What is the secret to getting Char(9)? Thanks in advance.

      (Mac OS 10.6.8, FMP 11)

        • 1. Re: Char(9) (tab) does not export
          philmodjunk

          Are you exporting to Excel or a text file?

          If you are exporting to a text file, why not just export the individual fields instead of as a single field with tab characters separating them?

          • 2. Re: Char(9) (tab) does not export
            JeffBorg

             

            Have tried both Excel and text export. When I view the calculated field in FMP, a tab space appears. When I export, just a standard word space. 

            The benefits of calculated fields would be:

            1) I wouldn't have to think about each field I wanted and in what order I wanted it each time I exported, and

            2) I could fetch certain fields for certain classes of people; other fields for others.

            • 3. Re: Char(9) (tab) does not export
              philmodjunk

              Tabs, in some exports are the separator character between fields/columns of exported data. Thus, they get mapped into a different character during export.

              The benefits of calculated fields would be:

              Yes, but none of that strictly requires using such a calculation--though with the right "grammar" an XSLT export might work.

              You could use a set of calculation fields for your list of exported fields with calculations that return data from different fields depending on selections made by the user...

              • 4. Re: Char(9) (tab) does not export
                Sorbsbuster

                You can more easily create a set of export scripts, one script = one of your calculation fields.  Then the export will respect the column (field) separators into Excel, text forma, or a merge file, for example.  As all the export -> import syntax is handled by the many types of export and import handled by FM and the destination applications, I can't see the benefit of effectively inventing another custom type.

                But, then, I am incredibly lazy.

                • 5. Re: Char(9) (tab) does not export
                  JeffBorg

                  Thanks Sorbsbuster and PhilModJunk for the tips.

                  XSLT is over my head, but the script idea accomplished my mission. I made some calculated fields to do the decision making. Then made a script to round up the fileds I wanted and finish the export. 

                  BTW, I figured out that CSV format would output tabs. FM must have suppressed them for other export formats.

                  • 6. Re: Char(9) (tab) does not export
                    iRonMrx

                    I know this thread is a bit dated, but I have a real world example that still needs a solution that Jeff was looking for.

                    I'm a teacher creating an export file of multiple choice questions to import into Blackboard. I need a tab-delimited text file, which I can easily create from Filemaker. Some MC questions have 4 distractors, some have 5. The questions are intermingled. I want Filemaker to be intelligent enough to distinguish. That's easy, and I already have a calculation field that determines whether the "4th" distractor is really a combination of the 4th and 5th distractors, or just the 4th when there's only choices A-D.

                    But... when I go to export, since Filemaker doesn't have a TAB symbol, like it has an end-of-record PARAGRAPH symbol, the 5th variable data isn't delineated by a TAB mark, but just a space.

                    I've tried explaining this to others, and have tried finding an answer here, but for years have not found a solution. Thanks, Jeff for starting this thread, maybe now someone (from Filemaker perhaps?) can explain a solution or work-around that doesn't necessitate having to perform multiple searches and exports for something Filemaker does half-way. Why not just put a TAB (Char #9) button under the ¶ symbol in the equation editor?

                    • 7. Re: Char(9) (tab) does not export
                      Sorbsbuster

                      When I want a tab character inserted into literal text I just copy and paste it from another word processing document.  For example, when I want to build up a text field in a script (to make a tabular presentation in an email or text field, say) I set the field to have the appropriate tab settings and then just use the pasted tab character.  Yes, it would be handy to have a button to insert it, but copy-and-paste from Word is two seconds, anyway.