5 Replies Latest reply on Feb 22, 2014 12:54 AM by GraemeC

    Put a Shift-Return into a text field

    GraemeC

      I made a database that lists tasks and generates a list of summaries of them into a text field.

       

      Users can copy the content of this field and paste it into a wordprocessor, and then apply a wordprocessor paragraph style so as to almost complete that part of their invoicing job.

       

      But the listing in the wordprocessor needs a line break within each paragraph - usually keyboarded as Shift-Return. I have not yet been able to find a way to make the script which assembles the summary listing into the text field put a Shift-Return in the correct place. As a result, users have to manually click at the spots and press Shift-Return - nasty!

       

      I managed to make the calculation place tab characters (by copying a tab character out of a wordprocessor and pasting it into the calculation), but this doesn't work for Shift-Return.

       

      How can I make a FileMaker calculation insert a Shift-Return?

       

      Many thanks, Graeme

        • 1. Re: Put a Shift-Return into a text field
          jbante

          The "shift-return" character is a line feed, and you can insert it in a calculation by using Char ( 10 ).

          1 of 1 people found this helpful
          • 2. Re: Put a Shift-Return into a text field
            mark_b

            Hi Graeme,

             

            You can use the Char () function to insert specific characters into text.  Character 13 is a carriage return (CR) and Character 10 is the line feed.  However, depending on your word processor, it may not make a distinction between the two.  What you might try is insert 2 CR (pilcrow symbol ¶) to separate your summaries, then after pasted into the word processor, do a search and replace for the 2 CRs and replace with a shift-return.  That still is somewhat nasty. 

            In Word (Windows 7, Word 2010) I hit the Enter key, then hit the Shift-Enter, then copied that text to a plain text editor and saved that file to my desktop.  I then opened up that file in a Hex editor and was surprised that there was no difference between the Hex characters stored (both were 0D (13)), yet the action in Word was different.  I'd be interested in seeing if someone else has a better idea.  I'm not really happy with my suggestion.

             

            Cheers, Mark

            1 of 1 people found this helpful
            • 3. Re: Put a Shift-Return into a text field
              keywords

              Have you considered completing the invoicing within your FM database? Taking the text out of the database and using it in a word processor to complete an invoice sounds a bit retrograde to me, when FM is quite capable of completing the whole process internallly.

              • 4. Re: Put a Shift-Return into a text field
                GraemeC

                Thank you mark_b and jbante. I hadn't noticed the Char() function; when I go to that client's office on Monday morning I'll try that.

                • 5. Re: Put a Shift-Return into a text field
                  GraemeC

                  Yes, that is a good idea and it is what I do for my own invoices.

                   

                  But for this particular client I have to go forward in small steps. Last year he was using Notes on his iPad as though it were a database of jobs to be done and his staff had numerous duplicate job numbers to resolve! I do at least now have him and his staff using a simple FM database with automatic generation of the next job number in sequence for the 20 or more clients he has - his staff are delighted! If he postpones retirement for long enough, I'll try to move him along a few more steps.

                   

                  Another thought I had was to export the list to an RTF file because the wordprocessor can import those; but I would have to find out how to generate the correct RTF codes. I'll try Char(10) first.

                   

                  All the best,

                   

                  Graeme