Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Character/string length validation for parameter

Solved721 views2nd August 2024length parameter validation
4
Daniel Zank [DevOps Advocate]208 31st July 2024 0 Comments

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

Daniel Zank [DevOps Advocate] Answered question 2nd August 2024

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
3
Klaas Dewitte [SLC] [DevOps Enabler]755 Posted 31st July 2024 7 Comments

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?

Daniel Zank [DevOps Advocate] Edited comment 2nd August 2024
Daniel Zank [DevOps Advocate] commented 1st August 2024

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

Klaas Dewitte [SLC] [DevOps Enabler] commented 1st August 2024

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?

Daniel Zank [DevOps Advocate] commented 1st August 2024

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

Klaas Dewitte [SLC] [DevOps Enabler] commented 1st August 2024

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

Daniel Zank [DevOps Advocate] commented 2nd August 2024

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

Show 2 more comments
You are viewing 1 out of 2 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin