title: Progress 4GL: Labelling a field from a variable
body: <p>I am having trouble labelling a field(s) on a frame. The number of fields and the required labels are determined at run-time.</p>
  
  <p>the required labels are stored in char array:</p>
  
  <pre><code>w-indarray[]
  </code></pre>
  
  <p>I am using the following loop to add the required fields to the frame </p>
  
  <pre><code>do i = 1 to w-nooff:                               
  form w-sstrings[i] with frame f1.     
  w-sstrings[i]:label in frame f1 = w-indarray[i].
  end.
  </code></pre>
  
  <p>But I get an error:</p>
  
  <pre><code>Widget array-element requires constant subscript.
  </code></pre>
  
  <p>I have googled but the only occurrence looks slightly different and I'm not sure if the solution is applicable. <a href="http://www.mofeel.net/258-comp-databases-progress/5295a6889.aspx" rel="nofollow">http://www.mofeel.net/258-comp-databases-progress/5295a6889.aspx</a></p>
  
  <p>I am assuming that being able to reference the elements of w-indarray[] as literals would resolve this as i could just do:</p>
  
  <pre><code>form w-sstrings[i] label "abc" with frame f1. 
  </code></pre>
  
  <p>is there any way of referencing the elements of the w-indarray[] as literals that I am missing?</p>
  
  <p>Thanks for your time. </p>