Hi All,
I try to configure a input parameter in the presentation. I will use the "Matching reqular expression" function to allow an input only with this characters which I will.
The customer can but doesn´t must put all the characters, but he cannot put any others characters.
I use the following value ValidationExpression="^([a-zA-Z0-9_\.\s\-]*)$" , but it doesn´t work.
for example:
I have an input parameter "Application Name" and the customer should could put the name "HR SQL Server - June 2012" or "HR SQL Server", but they shouldn´t could put a name like "HR´s SQL Server - June 2012".
Have somebody an idea for the value or a solution.
I did it for you. The action:
The workflow calling the action:
The workflow run.
The syntax must be the one compatible with OGNL.
When I cannot figure it out quickly enough I create an action that I use with the presentation property "Custom validation". Example to validate an IP address:
if (!ip.match(new RegExp("^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$"))) {
return "Invalid IP! (" + ip + ")";
}return null;
The advantage of using actions:
Christophe.
Hi,
This with the action is very good.
It is possible to create a action or scripted task which have an input parameter where the customer put a text and an output attribute where the text is in special format and without any spectial characters.
For example:
InputParamter -> CustomerApplicationName = HR´s SQL Server - 20.06.2012
OutPutAttribute -> ConsolidatedApplicationName = HR SQL Server - 20.06.2012
or
InputParamter -> CustomerApplicationName = Martin´s AppWorld - 20.06.2012 $TestApplication#
OutPutAttribute -> ConsolidatedApplicationName = Martin AppWorld - 20.06.2012 TestApplication
Sure, just set the action to return a string and have a string imput parameter and use the action with the default value presentation property with passin gthe first input field as the action parameter.
Christophe.
Hi,
Do you have an example for me how I can set a string as a return ?
Just edit the action and set set the return type.
And here is how you call it (the string is generated automaticaly with using the action icon on the right)
Here it is a custom validation. If you want to set a field default value, use the Default value presentation property.
Christophe.
Hi
I create a action
and a small Workflow
I run this workflow with special charecters, but I get the special characters in the output "NameResult"
I would expect it to do it since ! means not in javascript.
I did it for you. The action:
The workflow calling the action:
The workflow run.
Thank you very much
It is working very good and for what I need this.