Cannot set label with return data

I was trying to set the value of a label with return data from an API call.

In the end I changed to setting a Javascript Variable instead but I'd love to know what I'm doing wrong as the label value never changes.

In the code below jiraProjectId.value is a Javascript variable. valProjectId.value is a label but it's never set.

    onSuccess: function (data) {
      jiraProjectId.value =;
      valProjectId.value =;
  onFailure: function (error) {
    valProjectId.value = error


what do you mean by valProjectId.value is a label? like, are you using document.getElementById() to get the HTML element, did you implement something like this, or is jiraProjectId a Retool Component that has a Label?

if it's the last option (Retool Component) try using jiraProjectId.label instead of .value, otherwise I think you're going to have to revert to using document.getElementById() or .getElementByClassName() to get the HTML Label Element, which you can then manipulate in js.