Using the Highlight in Visual Overview it's possible to make a search functionality. By typing text in a field coupled to a variable you can then use the Regex on the Highlight to filter on the search phrase.
Currently I have following regex, where ServiceName is the variable being filled in on a search field.
Name=(.*[Var:ServiceName].*)
This works fine for searching, but when I empty the search field, all shapes are highlighted.
I'd need a regex that allows me to search for a word, but doesn't match an empty string.
Nothing I find online seems to match what I need.
Anyone who's good at regex?
I did a workaround by setting the initial value of the variable to 'Select Service' and to add a Clear Filter button next to the filter field which fills the variable with 'Select Service'.
Since there are not services with the name 'Select Service' it's not highlighting any of the service objects
Hi Jeroen,
Not sure if this external link can help - haven't tested any of the syntax suggested there - but if I understand correctly, you have a requirement to replicate the "Search" behaviour of the Surveyor filter, except that it would be fully based on a custom Visual Overview to highlight shapes basing on what is typed in the filter, correct?
Possible work around: could you hide all shapes when the search string is empty? Or can you initialize the Var to something else when the string is emptied?
As for regex in Visual Overviews, are you still subject to protected words such as "DMA"?
Far from being an expert of this protection in the search, but if the behaviour is the same would it be feasible to initialize the Var to a protected character sequence?
Or is it just a Visio label that you are using for the session variable?
In regex101.com I got it working with following regex, but unfortunately positive lookahead in regex doesn’t seem to work in DataMiner.
(?=.*test.*)(^(?!s*$).+)
Not sure about the ‘DMA’ keyword
Regarding the Keyword ‘dma’:
This keyword limits the results to only results of type ‘DataMiner Agent’. You can use it in combination with the ID, Name, IP, … of your agents in the cluster.
This is indeed not documented, but I’ll inform our documentation team so this can be added.
Thanks for the info Pieter.
On a side note, this protection looks excessive in Surveyor & Cube GUI filters as it simply does not allow the search of sequence “DMA” within any element name – so if I have an element called “AdManager”, *DMA* doesn’t return any element in the filtered list
PS & Off-Topic: Why is “DMA” a protected keyword?
What’s the requirement for this?
I never have a good answer when younger engineers ask me why they can’t find the DMA in the surveyor by typing just 3 letters