Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Offline data transform API

Updated on April 27, 2022

The offline data transform API consists of a JavaScript method that helps you to run a data transform in offline-enabled mobile apps by using a Run script action or a custom JavaScript function.

Offline validation is possible with the runDataTransform JavaScript method that is available for the pega.offline object.

Purpose

Runs a data transform with the specified name. You can run the data transform rule in the specified page context.

Signature

runDataTransform( datatransformName, className, pageName, callback )

Parameters

NameDescriptionTypeRequired
datatransformNameSpecifies the name of the data transform to run.String
classNameSpecifies the name of the class to which the data transform belongs.String
pageNameSpecifies the name of page (page context) in which to run the data transform. If you do not specify this parameter or set the parameter to a null value, the data transform runs in the primary page context.String
callbackSpecifies a JavaScript object that contains success and fail methods. The success method is called when the data transform has been run successfully. The fail method is called when an error occurs after a data transform run.Function
For example:

In the following example, JavaScript code runs the SampleDT data transform of the MY-SAMPLE-WORK-DATATRANSFORMS class, in the primary page context, from a custom JavaScript function:

var offlineDTCallback = {        
	success: function() {
		console.log("Data transform ran successfully");
	},
	fail: function() {
		console.log("Failed to run Data transform");
	}
};
pega.offline.runDataTranform( "SampleDT",
	"MY-SAMPLE-WORK-DATATRANSFORMS",
	null, 
offlineDTCallback);

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us