Alastair, Fortunately for me, the value of the variable populated by selecting a listitem is the value I want to match My method works. The item desired becomes selected and visible. I was just hoping there was a simpler way. In my book, simpler is always better.
Regards, Dennis ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Alastair Burr Sent: Monday, August 24, 2009 12:56 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: seting default value in variable ist view Dennis, I have seen no replies to your question but I have also tried to find ways to get a particular item highlighted and visible without success - except by cheating! What I did was force the sorting of the data to place the item I wanted near the top and then, knowing its position, use that value as the default for the property command. Not the best thing to do but it does work. What I would like is to be able to specify a text value rather than an integer count because the data is growing so the position of the text I want would change without the cheat I've used. Regards, Alastair. ----- Original Message ----- From: Dennis McGrath<mailto:[email protected]> To: RBASE-L Mailing List<mailto:[email protected]> Sent: Tuesday, August 18, 2009 8:22 PM Subject: [RBASE-L] - seting default value in variable ist view I've come up with this method of making a variable list view selected item default to a predefined value. Is there an easier way? Nothing else I tried would make sure the selected value was forced to be visible. -- populate variable list view PROPERTY RVarLookUpPart LOOKUPWHERECLAUSE .vWhere PROPERTY RVarLookUpPart REFRESHLIST TRUE --get count of items in listview GETPROPERTY RVarLookUpPart ITEMCOUNT 'vTmp' SET VAR vItemCount INTEGER = &vTmp --click each item and check listview variable against vQPart# SET VAR vItemIndex INTEGER = 0 WHILE vItemIndex < .vItemCount THEN PROPERTY RVarLookUpPart MAKECLICK .vItemIndex IF vNewQPart# = .vQPart# THEN BREAK --found it ENDIF SET VAR vItemIndex = (.vItemIndex +1) ENDW IF vItemIndex = .vItemCount THEN - no match found PROPERTY RVarLookUpPart MAKECLICK 0 -- click first item ENDIF PROPERTY RVarLookUpPart VISIBLE TRUE PROPERTY RVarLookUpPart SET_FOCUS TRUE Thanks, Dennis McGrath ________________________________ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.60/2311 - Release Date: 08/18/09 06:03:00

