on 04-26-2022 7:35 AM
Hi everyone,
I am implementing some rules from a customer into the business rules service for cloud on CloudFoundry.
Currently, I am struggling with the requirement of the customer to perform a substring on an input value.
For example my Data Object has the field CODE and if some conditions are met, the rule should return:
CODE.substring(3,3) .
Is this somehow possible with the current functionality of Business Rules Service and Expression Language 2.0?
Thanks and kind regards,
Tim
Hello Tim,
You cannot do substring in business rules. Instead you can use REGEX expression to achieve the same like for example MATCHES '\w{3}5(.*)'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can find available functions here https://help.sap.com/docs/BUSINESS_RULES/cc9e86e62f754dff82795508324bfd0c/f1d557b2ba30469d97314336f7...
Unfortunately, I do not see any substring function. I guess the workaround would be to add a "calculated" attribute in your data object that provides directly the CODE.substring(3,3) value ready to be consumed by your rule.
Regards,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.