on ‎2012 Mar 26 5:59 AM
Hi,
BPM process getting suspended if user skip to enter data for numaric field in BPM. I would like to know the syntax to validate data in BPM while mapping. I was tried using IF() condition but showing syntax error-
Mapping failed
IndexOutOfBoundsException: Index: 0, Size: 0
at: com.sap.glx.mapping.execution.implementation.function.builtin.generic.GenericGetFunction@36d60850(
I would appreciate your inputs on this.
Thanks in advance,
Dev
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dev,
Using BPM Mapping function for numeric validation is not possible. If you are usign WebDynpro for UI then you can assign the input field to numeic type (integer, float, etc) and it will automatically take care of numeric validation. By default the field will have 0, so even if the user skips it will not be a problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We are passing 0 from UI to BPM process if user skips to enter data from initial screen but while approve the task if user intentionally or accidently clear that value from input box obviously in BPM null value is come which causes process getting suspended. So I want to restrict such scenarios. It helps alot if you can share your ideas.
Thanks in advance,
Dev
Let us assume that we capture the field in type String. Then you can use an expression function like this -
integer ( IF( matches(input, "[0-9]+"), input, "0" ) )
We can use regular expression to check if the number is integer. If it is integer then IF block would return the same number otherwise it would return 0. The integer function is used to convert string back to integer. Hope this helps!
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.