Forum Discussion

JohnKelley's avatar
JohnKelley
Qrew Member
2 years ago

Extract text from one field to another

Hi, is it possible to extract text from one field to another based on a specific word or string?  I have been playing around with the right function but I am not getting the results I need.  As an example I would like to extract the data in bold type for each question.  So couldn't you have a formula that would look for "in the appeal:" and give the result "W123456789"?

1) Please enter the ID at the top of your letter in the appeal:

W1234567890


2) On a scale of 1-5 how satisfied are you :


     With the time it took to resolve the appeal once you submitted it to the appeals department: Not at all Satisfied with the time it took     
  
     That you were treated fairly?: Not at all Satisfied that I was treated fairly
  
     That the response you received was clear and easy to understand?: Not at all Satisfied was easy to understand      
  
     With your choices of how to correspond with us about your appeal?: Not at all Satisfied with my choices

------------------------------
John Kelley
------------------------------
  • See if this works

    var text UpToTheTwo = Part([Body],2, ")");
    var text AfterTheColon = NotLeft($UpToTheTwo,":");

    Left(Trim($AfterTheColon), " \n")

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • JohnKelley's avatar
      JohnKelley
      Qrew Member
      Thanks Mark! It worked like a charm to pull the ID ex. W123456789 but how about the next piece?  lets say I want to pull the answer to the question "That the response you received was clear and easy to understand?:"

      I have never worked with var text before so please excuse my lack of knowledge.
      Thanks for your assistance!


      ------------------------------
      John Kelley
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        using a formula variable  such as

        var text = 

        just allows you to store an intermediate calculation to break up the formula into small pieces which does not hurt your head so much or which allows you to temporarily change the formula to output an intermediate calculation for debugging purposes.

        The parsing is done using function like
        Left
        Right 
        NotLeft
        NotRight
        Part.

        The list of functions is here https://login.quickbase.com/db/6ewwzuuj?a=td

        I can't really take the time to work out the formula for each of the other questions but basically you have to be creative about the parsing. If you would like some one on one time with me to try to get them all working feel free to contact me by email.

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------