Skip to main content

setCancelData

setCancelData

Cancels applying the next response or push data to the DataSet, from the onCheckUpdateValid event.

Parameters

  • piName (String): The Provider Instance name
  • isCancelData (bool): true cancels applying the data to the DataSet, false allows it

Returns: None (void)

Description

Must be called synchronously inside the onCheckUpdateValid event handler. That event fires immediately before a server response is applied to the DataSet, and calling setCancelData(piName, true) keeps that response out of the DataSet.

Use it when the response code indicates an error, or whenever you want to block a screen refresh under a specific condition.

Example

// onCheckUpdateValid 이벤트에서 응답 유효성 검사
var code = $vm.getPiResultValue("orderProvider", "$.result.code");
if (code !== "0000") {
// DataSet 반영 취소 — 화면이 갱신되지 않음
$vm.setCancelData("orderProvider", true);
$form.showToastMessage("오류: " + code);
}

Related

  • $vm.getPiResultValue(piName, blockPath) — read a value from response data
  • $vm.subscribeData(provInstName, callback) — subscribe to real-time data