Good afternoon Skyline,
I'd like to parse one property of a service and instead of using an automation script to parse it, I'd like to know if it was possible to do it in Visio.
If yes, could you please provide any documentation.
Thanks by advance,
Good afternoon Jarno,
The current state of the property I’d like to modify is the following :
– SITE_1=MUS, PORT_IRD1_SLOT_C1=Slot: 5 Port: A, RELATED_CI_1_C1=Mus-MTG-AppearTV02;SITE_2=SAF, PORT_IRD2_SLOT_C1=2, RELATED_CI_2_C1=SAF_MTG_IRD02
The expected state I’d like to retrieve under a shape is :
Mus-MTG-AppearTV02, 2, these are the 2 information I’d like to keep, one is related to RELATED_CI_1_C1=, the other one to PORT_IRD2_SLOT_C1=.
So far I am able to retrieve, Mus-MTG-AppearTV02 thanks to (?<=RELATED_CI_1_C1=).[^;]*
In the Regexplace, I am not sure to understand the parameter z "the string that will replace each of the matches". Could you please explain with different words ?
Thanks !
Hi Hugo,
You can make use of the 'RegexReplace' placeholder to apply a regular expression to the service property, without making use of an autoamtion script. This is documented in Placeholders for variables in shape data values | DataMiner Docs
In short, make following replacements within [RegexReplace:x,y,z]
x = regular expression
y = [property:yourservicepropertyname]
z = The string that will replace each of the matches.
Feel free to post more details on how exactly the property should be parsed, in case you need further feedback.
Note that you can use named capture groups in the RegexReplace placeholder, something which is very powerful: https://www.regular-expressions.info/named.html
Good evening Ruben !
I have this property containing the following string :
“SITE_1=MUS, PORT_IRD1_SLOT_C1=Slot: 5 Port: A, RELATED_CI_1_C1=Mus-MTG-AppearTV02;SITE_2=SAF, PORT_IRD2_SLOT_C1=2, RELATED_CI_2_C1=SAF_MTG_IRD02;”
I’d like to retrieve the element name (Mus-MTG-AppearTV02) which is related to (CI_1_C1) and display it in a shape.
In Visio I tried the following command with the data field of type “element” :
RegexReplace:(?<=RELATED_CI_1_C1=).[^;]*,Property[AbortMaintenance],z
But I don't get the use of the "z" : the string that will replace each of the matches. Could you explain please ?
Thanks for you time all !
Good afternoon Ruben,
Any update on the following topic ?
Thanks by advance !
Hi Hugo, what actions do you exactly mean with ‘Parse’, i.e. what is your current state and expected state?