AnsweredAssumed Answered

Copy and Paste a Portal Row

Question asked by incybau on Dec 17, 2013
Latest reply on Dec 17, 2013 by incybau

Title

Copy and Paste a Portal Row

Post

     Hoping for help again here - I am trying to implement the method I saw on Dwayneright.com - old school method of copy and pasting portal rows.  (http://www.dwaynewright.com/filemaker-thoughts/2012/11/22/old-school-copy-and-paste-a-filemaker-portal-row-technique.html)

     In my portal though, I am copying 6 fields - I was able to copy the first three fields properly and the last field - I can't seem to get the 4th and 5th - coz I can't quite grasp the trim the and position part of the calculation - hoping someone can guide me on the  trim portion of the 4th and 5th data field:  this is what I have so far in my paste portal script:

     This sets the field for the 1st field properly:

         
  •           Left(EstimatesAndInvoices::CopyPortal; Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 1))

     This sets the field for the 2nd field properly:

         
  •           Trim(Middle(EstimatesAndInvoices::CopyPortal; Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 1) +2; Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 2) - Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 1)-2))
      
     This sets the field for the 3rd field properly:
              
  •                Trim(Middle(EstimatesAndInvoices::CopyPortal; Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 2)+2; Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 3) - Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 1)-5))
  •      

     I can't seem to get the 4th right:

         
  •           Trim(Middle(EstimatesAndInvoices::CopyPortal; Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 3) +3; Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 4) - Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 1)-6))

     I can't seem to get the 5th right:

         
  •           Trim( Middle(EstimatesAndInvoices::CopyPortal; Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 4) +2; Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 5) - Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 1)-6))

     This sets the field for the 6th field properly (which I got purely by trial and error):

         
  •           Trim(Right(EstimatesAndInvoices::CopyPortal; Length(EstimatesAndInvoices::CopyPortal) - Position(EstimatesAndInvoices::CopyPortal; " | "; 1; 4)-7))

     I know I should be trying to grasp the entire concept first but all the guides I read are based on single letter counts or numbers - I can't seem to relate this properly- hoping someone can tell me or guide me to an easy to understand explanation.

Outcomes