Topic Resolution: Answered
Viewing 4 reply threads
  • Author
    Posts
    • #12096
      Answered
      phuoc-nguyen
      Participant

        Hi guys,

        I need to verify if we can use Post-Filter Email to make Otobo system auto add match value to Dynamic-Field.

        When use Regex, Otobo understand it as a “string” not Regex ( Image below). Did anyone test this or do we have any option to use?

        Thank you in advance.

      • #12103
        Renée Bäcker
        Participant

          You need to use the regex in the search field and use the result in the set field.

           

          Search header field: Body
          for value: Age:\s*(?<age>0-9)+

          Set email header: X-OTOBO-DynamicField-AgeCustomer
          with value: [**\age**]

          • #12105
            phuoc-nguyen
            Participant

              Thanks Renee for your supporting.
              I use regex formula as you said but OTOBO only filter only 1 digit. I checked with Regex Online, it success filter only Digits but not fully success in my OTOBO (Image below). I wonder if my system wrong or something else need to check?

          • #12115
            phuoc-nguyen
            Participant

              Update:
              – Thanks to Renee, I success to use regex to add value to dynamic.

              One question: – Does the search condition have to be at same line?  From me, for each value I have 2 lines. I try to use regex but it not work. Testing in regex online is work but not correct in OTOBO.

               

               

              Result 

            • #12118
              Best Answer
              Renée Bäcker
              Participant

                Replace “\n” with “\s+”:

                Age\s+(?<age>...

                ^

              • #12128
                phuoc-nguyen
                Participant

                  Thank you.

                  Everything is working as expected.

              Viewing 4 reply threads
              • The topic ‘ Use regex to add value to Dynamic-Field’ is closed to new replies.