The M-Files Community will be updated on Tuesday, April 2, 2024 at 10:00 AM EST / 2:00 PM GMT and the update is expected to last for several hours. The site will be unavailable during this time.

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

Using Property Calculator and Regex on a Property ?

Hi there, 

Is it possible to use the Property Calculator to trim a (Text)Property ? 
For Example, i have a Property like "001/A23" from a external DB (or imported) 
and i want to get rid of the "/" (or any other special Character) so the Result should be "001A23"

Regards, 
Thomas

Parents
  • Hi Thomas,

    Property Calculator does not currently have direct replace or trim function for text. Pick Substring -mode can sometimes be used to implement this kind of feature.

    For example:

    Configuration above does requested action and saves trimmed value to "Trimmed Text" property. (You could also save trimmed text to same "Text" property  if you like to)

    It is good to notice that configuration above removes '/' character only once. Currently there is no way to have single condition that would loop and remove them all. (It is already on list of improvement ideas, but I cannot promise when or if it will be available)

Reply
  • Hi Thomas,

    Property Calculator does not currently have direct replace or trim function for text. Pick Substring -mode can sometimes be used to implement this kind of feature.

    For example:

    Configuration above does requested action and saves trimmed value to "Trimmed Text" property. (You could also save trimmed text to same "Text" property  if you like to)

    It is good to notice that configuration above removes '/' character only once. Currently there is no way to have single condition that would loop and remove them all. (It is already on list of improvement ideas, but I cannot promise when or if it will be available)

Children
No Data