Discussions

Expand all | Collapse all

Extracting PO# or Invoice # from a Field into another Field

  • 1.  Extracting PO# or Invoice # from a Field into another Field

    Posted 02-28-2018 18:11
    From a subject field, I would like to extract any number that may be a PO# or Invoice #. For example, the subject field may say, "Strong-Tie Invoices W987567 and W23234324 on your PO# 27987324 due 3/25/2018." 

    The invoice or po #'s will always contain a number and sometimes contain a letter. What is the best way to isolate and list these numbers in another field?


  • 2.  RE: Extracting PO# or Invoice # from a Field into another Field

    Top
    Contributor
    Posted 02-28-2018 19:03
    Easy - use this native Rich Text formula field:

    "<div class='Vibrant Success' onclick=\"var QBU_subject=_fid_6.value;var QBU_matches = QBU_subject.match(/([a-z]?[0-9]{5,})/gi);_fid_7.value=QBU_matches.join('\\n');\">Parse</div>"
    Demo below:

    Before pressing Parse button:




    After pressing Parse button:




    Parse With Script
    https://haversineconsulting.quickbase.com/db/bnhq45zk4?a=nwr

    Pastie Database
    https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=642


  • 3.  RE: Extracting PO# or Invoice # from a Field into another Field

    Posted 03-01-2018 19:53
    WOW! THANK YOU SO MUCH!!