Topic Resolution: Answered
Ansicht von 4 Antwort-Themen
  • Autor
    Beiträge
    • #12096
      Answered
      phuoc-nguyen
      Teilnehmer

        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
        Teilnehmer

          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
            Teilnehmer

              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
            Teilnehmer

              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
              Teilnehmer

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

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

                ^

              • #12128
                phuoc-nguyen
                Teilnehmer

                  Thank you.

                  Everything is working as expected.

              Ansicht von 4 Antwort-Themen
              • Das Thema „ Use regex to add value to Dynamic-Field“ ist für neue Antworten geschlossen.