Forum Discussion

MarkoKrajinovic's avatar
MarkoKrajinovic
Qrew Trainee
5 years ago

Formula to extract a part of text from one field to another.

Hi all,

I want to extract a piece of information from one Rich Text field into a simple Text field, or multiple fields by using a formula.

So, as an example, from [Intro] "Hi, my name is Marko, I play a guitar." extract "Marko" into [Name] field and "guitar" into [Hobby] field.

Would this be possible?

Thanks in advance!

------------------------------
Marko Krajinovic
Sizmek
Belgrade
------------------------------

6 Replies

  • I think that you would have to provide several examples of what the actual text is in order to know whether there's enough of a pattern in the data for a formula to be able to extract certain fields.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------
    • MarkoKrajinovic's avatar
      MarkoKrajinovic
      Qrew Trainee

      Hey Mark,

      Thanks for coming back to me! Here's an example of what I need as close to the real thing as possible:

      Field [Tag] contains: <script src="https://domain.com/article/script.sr?param1=test&param2=28&param3=8736452323&param4=0&param5=true&param6=1"></script>

      Field [Tag Extract] should contain: 8736452323

      I was able to extract param3=8736452323, by adding the ampersand as the delimiter, but I'm not able to narrow it down to just the number, which is between the = and the & characters.

      Hopefully, this can help with troubleshooting.

      Thanks!
      Marko



      ------------------------------
      Marko Krajinovic
      Sizmek
      Belgrade
      ------------------------------
  • I have a great example, I'm not sure if this is something that Mark is specifically talking about -- but I have a Zapier webhook from a multi-choice field in a Gravity Form to deposit into a multi-line text field in QB.

    The multi-choice field is set up for states, and so when it's deposited into my multi-line text field in QB it looks like this: "California, Hawaii, Minnesota, Washington"

    I want to set up something that will separate those into their own text fields once I check a box, or once the entry is added, or something. The ultimate goal I have with this project is to be able to create a child entry for each of those "lines"

    ------------------------------
    Jessica Adkins
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      You can parse out the various pieces like this. into separate formula fields.

      Trim(Part([my comma separated field],1,","))

      then the next one would be

      Trim(Part([my comma separated field],2,","))

      Then you can have an Automation fire to
      Step 1 delete any existing children.
      Step 2 though 11, create say 10 records 
      Step 12, delete any blank children.

      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      markshnier2@gmail.com
      ------------------------------
    • TabathaGarrett's avatar
      TabathaGarrett
      Qrew Member
      This is very similar to an issue that I am having. I need to separate multiple pieces of data from a multi-text field so that I can add a value to each piece of data. Do you know anyway to accomplish this?

      ------------------------------
      Tabatha Garrett
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        If you convert your multi select field to a text field lie this

        ToText([my multi select field])

        then if will be like curley ; larry ; moe

        ie separated with a space semicolon space.

        so then you can make a new field for the 1st part (form the left)

        Trim(Part(ToText([my multi select field]),1,";"))

        Then the 2nd part would be 
        Trim(Part(ToText([my multi select field]),1,";"))





        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------