Hi Dojo!
We would like to check the entered character length (minimum length/maximum length) before passing a parameter to an element. Is there any way to do this directly in Visio or do I have to go the detour via an automation script?
Thanks for your answer and suggestions!
Daniel
Hi,
Depending on your implementation, this can be possible using the [RegexMatch] placeholder in Visio.
Below I created a setup that shows and hides the set button for the parameter unless the output of this placeholder is not empty, which is only the case when the input is between 5 and 10 characters.
If this would not be possible as a solution, would it be possible to provide more info on your setup?
Hi Daniel
I noticed that the “Logical expression” part of the show is missing, I would expect to see ^A|… .
Secondly, using the ^ as separator here could cause issues as it is also used within the Regex itself. Changing this to for example a # could solve that.
I would expect the beginning of the show data to look like: “[sep:-#]#A|…”
Lastly, although I don’t know the rest of the setup so this is probably not an issue but I noticed that the setvar output is “MyOutput1” but the variable input is “PWD_FS_SRT-extern-12”.
Could you check these items to see if these are the issues that cause the show condition to now work?
Hi Klaas,
your right, I copied the wrong variable. In the visio the variable is still set as “PWD_FS_SRT-extern-12”.
SetVar=PWD_FS_SRT-extern-12
options=cardvariable
Execute=Set|[var:HMG2ElementID]|6066:[Route]: FS_SRT-extern-12 – [Source]: FS extern 12|[cardvar:PWD_FS_SRT-extern-12]|NoConfirmation
show=[sep:-#]#A|Value|[Regexmatch:[Sep:,%]^.{5,10}$%[cardvar:PWD_FS_SRT-extern-12]]|!=
I changed the separator to #, thanks for the hint! But it is till not working
Hi Daniel
I don’t know if it is because of copying but I still seem to miss the Logical expression part at the beginning of the show shape data. This will provide the information what logical path the shape should follow for when to show or hide, without it the shape will indeed always show.
The expected show shape data would be: “[sep:-#]#A|Value|[Regexmatch:[Sep:,%]^.{5,10}$%[cardvar:PWD_FS_SRT-extern-12]]|!=”
If this would not be the issue, what you can also try is place the RegexMatch part in a separate shape as text to see if it indeed empty when the text is not in between 5 and 10 characters
Hi Klaas,
I can confirm that regexmacht is the solution for our request. Thanks for your great help!
It was a bit tricky to test it, because we have some trouble with different Dataminer Cube versions and different behavior.
And the correct show shape data should be:
[sep:-#]#A|Value|[Regexmatch:[Sep:,%]^.{5,10}$%[cardvar:PWD_FS_SRT-extern-12]]|!=
Kind regards,
Daniel
Hi Klaas,
thank’s for your help and the hint to “Regexmacht”.
Our setup:
We want to save a password to a parameter on an element, but the device requires a minimum and maximum length. The length check will be helpful for our operators, typing in the required length.
I tried to test it, but think there is still a problem in my head, implementing the shape data.
Shape data fields for the variable:
SetVar=MyOutput1
Options=cardvariable
Shape data fields for the save button:
Execute=Set|[var:HMG2ElementID]|6066:[Route]: FS_SRT-extern-12 – [Source]: FS extern 12|[cardvar:PWD_FS_SRT-extern-12]|NoConfirmation
Show=[sep:-^]^A|Value|[Regexmatch:[Sep:,%]^.{5,10}$%[cardvar:PWD_FS_SRT-extern-12]]|!=
However, the button is always displayed.
What I am not paying attention to here?
Kind regards, Daniel