title: How to resolve typerror: string.padStart is not a function
body: <p>I'd like to add leading zeros to a field value, so that if its not 4 digits, leading zeros will be added to make it 4 digits. I have taken the field value and made it into a string but its giving me this error.</p>
  <pre><code>var relay=this.getField(&quot;RELAY NUM&quot;).value;
  var relayString=relay.toString();
  
  var leadingZeros=relayString.padStart(4,'0');
  
  
  TypeError: relayString.padStart is not a function
  5:Console:Exec
  </code></pre>