This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Break up email subject and map to properties

If I poll a mailbox using M-Files, and the subject line has 4 delimiters, how can I map the data for each value in the subject line to properties on the class?



I am familiar with regex so no issues wtih this approach, but am not clear how. The only thing I can come up with is to map the entire subject line to a property, and then run a script on that property which uses regex to break up the 5 values in the subject line to map to properties. Again, my only issue is how.

If someone has any suggestions or samples they can share that would be great.

Regards

Adam

Parents
  • Hi Adam,

    for this type of case, you can use our Extension Kit, a no-code solution for M-Files. With the Extended property operations module, you can create a rule that uses regex to separate values. I've created this demo rule to make the features of this module easier to see.
     


    I've created properties Subject, First Value, Second Value, Third Value, Fourth Value, and Fifth Value. For testing purposes, I put the value of Subject as "abc-asd-qwe-fgh-ioa".
    With Extended property operations I created a rule which triggers when an object is created. There are 5 different property setters in this configuration (one for each value). In the first picture, you can see an example of setting First Value where I wrote a regex that groups words with separator "-" and selected the "0" group. Then for each property, I matched different groups (1 for Second Value, 2 for Third Value etc.).
    This is the end result:

    I hope this helps and feel free to ask any questions.

Reply
  • Hi Adam,

    for this type of case, you can use our Extension Kit, a no-code solution for M-Files. With the Extended property operations module, you can create a rule that uses regex to separate values. I've created this demo rule to make the features of this module easier to see.
     


    I've created properties Subject, First Value, Second Value, Third Value, Fourth Value, and Fifth Value. For testing purposes, I put the value of Subject as "abc-asd-qwe-fgh-ioa".
    With Extended property operations I created a rule which triggers when an object is created. There are 5 different property setters in this configuration (one for each value). In the first picture, you can see an example of setting First Value where I wrote a regex that groups words with separator "-" and selected the "0" group. Then for each property, I matched different groups (1 for Second Value, 2 for Third Value etc.).
    This is the end result:

    I hope this helps and feel free to ask any questions.

Children
No Data