setControlAttributeInResponse()

This function can be used in an on execute hook to set an output control attribute in the response. It must only be used in an on execute hook for batch implementations.

function boolean setControlAttributeInResponse(long io.response, const string i.name, constĀ stringĀ i.value)

Input:

  • io.response: request that is to be used as output for an on execute hook.
  • i.name: name of the control attribute (case-sensitive).
  • i.value: value to be set for the control attribute.

Output:

  • return value: true if successful, false otherwise.
  • io.response: updated request having the control attribute set (if return value is true).

If the control attribute does not exist in the response it is added. If the control attribute already exists, its value is updated. Consequently, if this function is invoked multiple times for the same response, only the last value is used.