I'm creating a model that will allow me to introduce restrictions of what may be place into a text box that populates a variable.
The current model uses a text box and then a custom action should look to see what is entered. If the entry contains an
underscore then a message will pop up, the process stopped until the user acknowledges the message and goes back to
change what they put in the text box.
it's all looking good but i've goosed up on the vbs part of this. I am able to put in a specific string and the process
works as expected - such as look for the string "testing" and the process prompts etc... as above. It's when i try to
use a more dynamic option such as look for "*_*" that it falls over and becomes valid each time. Is there a better
way to make this happen. I'm including my code and my model Aip.
Thanks in advance.
Ian
My vbs code:
svr_name = Session.Property("SVR_NAME")
' SVR_NAME is the public property of the "EditBox" control where the user enter the server name
' Session.Property("SVR_NAME") is the function used to get the value of the "SVR_NAME" property
' these are the minimum requirements for the server name to be valid
if InStr(svr_name "*_*")
then Session.Property("VALID_SVR_NAME") = "invalid"
'message box custom action via published event on dialogue box 'Next' button
else
' the server name is not invalid
Session.Property("VALID_SVR_NAME") = "valid"
end if
FOLLOW US
Get the latest news in Application Packaging