applyPatches method

Note: STABLE.
This API is reliable and breaking changes are unlikely.

backendApi.applyPatches(qPatches, qSoftPatch)

Updates the properties for this object.

Version history

Introduced 1.0

Parameters

qPatches

Type: Array

Array of patches. Each path contains:

  • qOp: Add/Remove/Replace
  • qPath: Path to property
  • qValue: The new value in string format. Strings need to be surrounded by \".

qSoftPatch

Type: Boolean

Set to True if properties should be soft, that is not persisted.

Returns

A promise of a Qlik associative engine reply.

Tip: For more information regarding a promise, see https://code.angularjs.org/1.7.0/docs/api/ng/service/$q#the-promise-api.

Example

this.backendApi.applyPatches([
{
	"qPath": "/qListObjectDef/qDef/qSortCriterias/0/qSortByLoadOrder",
	"qOp": "replace",
	"qValue": "-1"
},
{
	"qPath": "/meta",
	"qOp": "add",
	"qValue": "{ \"data\": \"this is the data\"}"
}
], true);

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?