Question
Cognizant Technology Solutions
IN
Last activity: 12 Jun 2025 0:46 EDT
How to invoke a validation rule using a function in Data transform
How to invoke a validation rule using a function in Data transform. I have used Activity to validate rule. Is there any other method/function through which it can be used in Data transform.
***Edited by Moderator Marije to change Content Type from Discussion to Question; Changed General to Product, added capability tags***
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Updated: 9 Jan 2025 4:56 EST
Tata Consultancy Services
IN
We can't invoke Validate Rule from Data Transform rule, So that, you can include the validation rule in activity and invoke activity from data transform.
Thanks,
Ashok
Updated: 21 Apr 2025 10:17 EDT
Cognizant Technology solutions
IN
Hi @NandhiniKumar I found this function alias as corrected by @Bhumireddy , which uses an Edit validate rule not a Validate rule which might meet you req:
@invokeValidate({property name}, {edit validate rule name}).
Do let me know if you face other issues with this.
Regards,
Sivani.
Tata Consultancy Services
IN
Hi @Sivani,
Could you please attach the screenshot, I am not able to find the the this function.
@invokeValidate({property name}, {edit validate rule name}).
Thanks,
Ashok
Cognizant Technology solutions
IN
For some reason I am unable to upload the screenshot, I see 99% done but not 100% during upload processing. I can mail you the same if needed
Regards,
Sivani
Updated: 21 Apr 2025 8:47 EDT
Tata Consultancy Services
IN
Okay, yes Please and also I have sent the Linkedin request
Tata Consultancy Services
IN
Create an activity, use Obj-Validate method and pass a param for validate rule name.
In the Data Transform add Params(Validate rule name and message) use pxExecuteAnActivity method and call above created activity.
DPIE
AU
@NandhiniKumar there isn't any function through which you can directly invoke validate rule (Ruel-Obj-Validate instance) but you can achieve this either by calling an activity in data transform or write a function for the same. May be give it a go for function and share us the result
Use this api doAction(StringMap aKeys, ClipboardPage aNewStepPage, ParameterPage aNewParam).
aKeys = Prepare a keyValue pair of rule-obj-validate class
aNewStepPage = your current steppage
aNewParam = parameter page
Collab partnerz Pvt Ltd
IN
Hi @NandhiniKumar,
Since Data Transforms can invoke Activities using @Utilities.pxCallActivity(), you can still reuse your activity that performs the validation:
Example: @Utilities.pxCallActivity("MyClass", "MyValidationActivity", tools)
Your activity should contain the Apply-Validate method to invoke the validate rule.
Drawback: Still uses Activity, just invoked differently.