` Printed Icetips Article

Icetips Article



ABC: Return use variable for entry controls
1999-02-05 -- Jon Waterhouse
 
Newsgroups: comp.lang.clarion

If you have the history enabled on the form this should be possible. Below
is a window manager method I wrote to return the label of a the use variable
of a given control. You should be able to modify this to do what you want
(which is to return the field number of a given use label). My first attempt
is given below.

WindowManager.GetFieldLabel PROCEDURE(SIGNED Control)
Left ANY
  CODE
    IF ~SELF.History &= NULL
      SELF.History.Control = Control
      GET(SELF.History,SELF.History.Control)
      IF ~ERRORCODE()
        return(SELF.Primary.Me.File{prop:label,SELF.History.FieldNo})
      END
    END

WindowManager.GetFieldByLabel PROCEDURE(STRING UseLabel)
Left ANY
  CODE
    IF ~SELF.History &= NULL
      loop i# = 1 to records(self.history)
         get(self.history,i#)
         if SELF.Primary.Me.File{prop:label,SELF.History.FieldNo}=UseLabel
            return(SELF.History.Control)
        end
      END
    END



Printed November 21, 2024, 12:13 pm
This article has been viewed/printed 35375 times.
Google search has resulted in 11 hits on this article since January 25, 2004.