📢 New on-demand webinar: Extend AI capabilities in M-Files without coding!  WATCH NOW

📢 New on-demand webinar: Extend AI capabilities in M-Files without coding!  WATCH NOW

Notifications
Clear all

Extended Autoproperties, Ternary operations, if Regex produces a date then ...

0
[#158]
Topic starter

Need to configure a rule where if a Regex results in a date (any date equal to or lower than Today()) then set lookup value 1, else if Regex results in a number (any 7 digit number) then set lookup value 2.
I am able to configure Regex part of the Ternary rule, but how do I configure the part following the operator?
Perhaps it is OK to simplify the rule to something like this:
If Regex result <= Today() then lookup value 1, else lookup value 2 ?


Topic starter
12/08/2026 12:13 pm

Well, I could not find a solution to the challenge above. However, I found a different, string based parameter in the same text that can be used to determine the outcome.

Please note that it is a bit confusing that Regex parser apparently does not work with \n (new line) in Extended Autoproperties (mentioned in Info on "Replace newline characters). I have used a lot of Regex with newline characters in the Property Operations module. Have never seen any issues there. So, one has to be very cautious when creating Regex for Extended Autoproperties where \n by default is replaced with \s (white space) in the source.


2 Answers
0

Hi Karl, 

 

Thanks for reaching out! Could you please provide an example of a specific input that needs to be processed with the regex function? That way, I can suggest the best solution for your particular case.

I’m aware that the newline issue can be challenging, and it is already on our roadmap to add an option for specifying a custom set of characters that would replace the newline. This would make newlines distinguishable from regular whitespace. However, since we have quite a few features planned, this improvement has not made it into the development queue yet.

If you need this feature sooner, I can check with the team whether it would be possible to include it in one of the releases planned for this year.

Best regards,

Nika


Topic starter
13/08/2026 7:32 am

Hi @nikatilic 

As mentioned I found a different solution for this task, so no urgency for a solution based on dates.

The strings that I need to distinguish between are:

-- Rekvisition03-07-2026_08-15-332816
¤¤¤D_7_20260703081522c16eb6-0a63_1_2E639456-3FC2-4078-AD3C-AF14218CCE3A

and 

-- Rekvisition2138741
Flytterekvisition

My original idea was to look at the first line and use the characters following "-- Rekvisition" - that is where we see a date in one string and a 7 digit number in the other. 
My alternative solution was to look at the second line - in one case it always has "Flytterekvisition" in that position. I managed to configure a ternary rule using this string.

Both examples come from lengthy texts extracted from a PDF (incoming purchase order). The text has many lines and newline characters. If the parser works the same way as in Property Operations, then those newline characters can be quite helpful in constructing Regex rules. I use that a lot to extract data with Property Operations 😀 


0

I understand 🙂 The key difference is that the Property Operations module and Extended Auto Properties don’t use the same parsing logic. Extended Auto Properties module is designed around each property value being converted to a string before the expression is applied. That’s why the approach you described, which works well with Property Operations, unfortunately can’t be applied in the same way with Extended Auto Properties. I hope you’ll still be able to combine Property Operations and Extended Auto Properties to achieve the desired results for your other use cases.


Topic starter
13/08/2026 8:52 am

@nikatilic OK. Thanks for explaining why it works differently, it makes sense. It is just not something you intuitively understand while working with the modules. It might help to insert something along those lines in the documentation and possibly in the info-text on the module. Ternary rules are some of the most difficult to work with, and if you already have experience with Regex from other modules then your focus is on the ternary configuration rather than the Regex 😉