` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Where, What
2001-07-31 -- Jeff Slarve
 
WHERE() is a function that returns the field number of a field in a group or queue. I use it quite a bit when using a queue in a listbox where the sequence of the queue fields doesn't match the order that show in the listbox. Something like ?List{PROPList:FieldNo,1} = WHERE(MyQueue,MyQueue.Name) This way, if MyQueue.Name happens to be the 5th field in the queue, I can still use it as the first column in the listbox. Does that make sense? WHAT() returns a reference to a field in a group or queue. By obtaining this reference, you can write code that is somewhat generic without having to hardcode the label of the actual field throughout your code. Something like this: MyRef ANY Code MyRef &= WHAT(MyFileRecord,5) Now, anything that you do with MyRef is the same as if you had done it to the 5th field in the record without having to know it's label. You can write a bunch of code that uses MyRef.


Today is May 1, 2024, 11:38 pm
This article has been viewed 35122 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: