I'm a huge fan of...
set var vwhere text = "where vLastName is not null order by vLastName"
PROPERTY varList REFRESHLIST "true"
(just checking but is vLastName a column in the table/view of your listview
source table?)
and I go even further yet to build my list view where clause, get the current
sort order (just incase a user has thier own sort order), user set column
sizes, and top item (which if the list is huge and your are half way to the
bottom the refresh command will send you to the first row).
I have a Variable Lookup ListView control, "atv_ClientAdvoServicesList", that
has 10 columns, "WHERE T1.AdvocacyID=T2.AdvocacyID AND
T2.Client_ID=T3.Client_ID AND T2.ACP_PartGroupID=T4.ACP_PartOptionID
&FAFv_FltrWhere" and "&FAFv_OrderBy" in the box for the WHERE clause under the
Lookup Settings Property Tab...
here is my refresh syntax...
SET VAR FAFv_OrderBy TEXT
SET VAR FAFv_OrderBy1 TEXT
GETPROPERTY atv_ClientAdvoServicesList CURRENTSORT 'ofvOrderBy1'
IF FAFv_OrderBy1 CONTAINS 'ASC' OR FAFv_OrderBy1 CONTAINS 'DESC' THEN
SET VAR FAFv_OrderBy =('Order by '+.FAFv_OrderBy1)
ENDIF
SET VAR x INTEGER = '0'
WHILE x<'10' THEN
SET VAR V TEXT =('set var xColWidth'+CTXT(.x)+' text')
&v
SET VAR V TEXT =('GETPROPERTY atv_ClientAdvoServicesList
COLUMNS['+CTXT(.x)+']->WIDTH ''xColWidth'+CTXT(.x)+'')
&v
SET VAR x INTEGER = (.x+1)
ENDWHILE
--refresh results
SET VAR xTopItem TEXT = NULL
GETPROPERTY atv_ClientAdvoServicesList TOPITEM 'xTopItem'
IF FAFv_FltrOnCaseReportingType ='Y' THEN
SET VAR FAFv_FltrWhere = (.FAFv_FltrWhere & ' and CaseReportingCategory =
'''+.FAFv_FltrAdvocacyReportingGroup+'''')
ENDIF
IF FAFv_FltrTxtField <> 'None' THEN
SET VAR FAFv_FltrWhere = (.FAFv_FltrWhere & ' and
'&.FAFv_FltrTxtField&.FAFv_FltrTxtCondition +' '''+.FAFv_FltrTxtData )
IF FAFv_FltrTxtCondition = 'Like' THEN
SET VAR FAFv_FltrWhere = (.FAFv_FltrWhere +'%''')
ELSE
SET VAR FAFv_FltrWhere = (.FAFv_FltrWhere +'''')
ENDIF
ENDIF
IF FAFv_FltrDateField <> 'None' THEN
SET VAR FAFv_FltrWhere =(.FAFv_FltrWhere &'and')
IF FAFv_FltrDateCondition = 'Between' THEN
SET VAR FAFv_FltrWhere = (.FAFv_FltrWhere
&.FAFv_FltrDateField+'>='+CTXT(.FAFv_FltrDateStartData)+' and '+
.FAFv_FltrDateField+'<='+CTXT(.FAFv_FltrDateEndData) )
ELSE
IF (FAFv_FltrDateStartData= ' ' OR FAFv_FltrDateStartData IS NULL) AND
FAFv_FltrDateCondition='=' THEN
SET VAR FAFv_FltrWhere = (.FAFv_FltrWhere&.FAFv_FltrDateField&'is null')
ELSE
SET VAR FAFv_FltrWhere =
(.FAFv_FltrWhere&.FAFv_FltrDateField&.FAFv_FltrDateCondition&CTXT(.FAFv_FltrDateStartData))
ENDIF
ENDIF
ENDIF
PROPERTY atv_ClientAdvoServicesList RefreshList 'TRUE'
PROPERTY atv_ClientAdvoServicesList TOPITEM .xTopItem
SET VAR x INTEGER = '0'
WHILE x<'10' THEN
SET VAR V TEXT =('PROPERTY atv_ClientAdvoServicesList
''COLUMNS['+CTXT(.x)+']->WIDTH'' .xColWidth'+CTXT(.x))
&v
SET VAR x INTEGER = (.x+1)
ENDWHILE
clear var x%,v%
return
----- Original Message -----
From: [email protected]
To: RBASE-L Mailing List
Sent: Monday, February 01, 2010 4:03 PM
Subject: [RBASE-L] - More Questions on LookupWhereClause Property
I'm a bit unclear about the LOOKUPWHERECLAUSE property in R:BASE eXtreme 9.0
(64-bit) and was wondering if anyone knew the answers to these questions:
1) Is PROPERTY <comp ID> LOOKUPWHERECLAUSE 'value' is a valid
property for a Variable Lookup LISTVIEW? I know it is for a Variable Lookup
LISTBOX - it shows up under the Syntax Builder for the PROPERTY Command on
R:BASE's website. It is not on the property list for Variable Lookup Listview
at this time, though.
2) Why is the word "LOOKUPWHERECLAUSE" not bolded like other property
commands (e.g., "REFRESHLIST") when I use the LOOKUPWHERECLAUSE property
command in an EEP or Form Action when I am using the editor to edit an EEP/Form
Action?
3) I have a Variable Lookup ListView control, "varList", that has "&vwhere"
in the box for the WHERE clause under the Lookup Settings Property Tab.
Assuming the LOOKUPWHERECLAUSE property is valid for a Variable Lookup
Listview, which is preferable?
set var vwhere text = "where vLastName is not null order by vLastName"
PROPERTY varList REFRESHLIST "true"
or
set var vlookupwhereclause text = "where vLastName is not null order by
vLastName"
PROPERTY varList LOOKUPWHERECLAUSE .vlookupwhereclause
PROPERTY varList REFRESHLIST "true"
(and does it matter if the Variable Lookup Listview control has "&vwhere" in
the WHERE clause section under the Lookup Settings Property Tab? In this case,
which takes precedence, the LOOKUPWHERECLAUSE property or the WHERE clause
variable defined in the Listview control)?
These are probably insignficant questions but I want to make sure I am
correct in my assumptions for my application. Thank you so much --
Diane DeMers
[email protected]
DeKalb, IL