You need to manage the datawidow query status / service ... Take special
note of setting QueryClear attribute
....dw_list.Object.DataWindow.QueryClear = 'Yes'

Sample code follows:
...RJC

/******************************************************/
SAMPLE  PFC_RETRIEVE 

// If Query Mode On Need To Turn Off
IF IsValid(inv_QueryMode) THEN
        parent.Title = "PTD Meter Tickets - ENTRY MODE "
        Object.cc_rowcount.Visible = 1
        inv_QueryMode.of_SetEnabled(FALSE)
END IF

// Turn Valid Query Cols Text To Black
ll_Max = UpperBound(is_collist)
ll_Cnt = 1
ls_Color = string(RGB(0,0,0))
DO UNTIL ll_Cnt > ll_Max
        ls_ModString = is_collist[ll_cnt] + "_t.Color ='"
        ls_ModString = ls_ModString + ls_color +  "'"
        ls_Return = dw_list.Modify(ls_modstring)
        ll_Cnt ++
LOOP

// Disable Cols
ls_ModString = "'" + string(12632256) + "'"
inv_base.of_modify('Background.Color',ls_ModString,'column','detail',TRUE)

ls_ModString = "'" + string(1) + "'"
inv_base.of_modify('Protect',ls_ModString,'column','detail',TRUE)

// Check For Filter
IF FilteredCount() > 0 THEN
        SetFilter("")
        Filter()
END IF

// Retrieve Rows 
il_RowCount = Retrieve(gnv_app.ids_userprofile.Object.usr_cd_company[1])

// Clear Query Values - Sets SQL Back To Original Values
IF IsValid(inv_QueryMode) THEN dw_list.Object.DataWindow.QueryClear = 'Yes'

IF NOT il_RowCount > 0 THEN
        MessageBox("No Rows Found","No rows found for query
criteria.~r~nPlease try again.")
        EVENT Post km_querymode()
END IF


Return il_RowCount


/******************************************************/
SAMPLE ---- KM_QUERYMODE (Custom Datawindow Event)

// Declare Local Variables
STRING  ls_ModString, ls_Return, ls_Color
INTEGER li_Response
LONG ll_Cnt, ll_Max
DataWindowChild ldwc


// Check for any updates that may be pending
li_Response = 2 
IF ModifiedCount() + DeletedCount() > 0 THEN
        li_Response = MessageBox("Updates Pending",&
                                        "Changes were not saved.~rDo you
wish to continue ?",&
                                        Question!,YesNo!,2)
                                        
        IF li_Response = 2 THEN
                RETURN 0
        ELSE
                Reset()
        END IF
        
END IF


gnv_app.of_GetFrame().SetMicroHelp("Loading query dropdowns .... Please
wait.")

// Turn On Query Service
IF NOT IsValid(inv_QueryMode) THEN
        this.of_SetQueryMode(TRUE)
END IF

// Change Text Color of Cols That User Can Query
ll_Max = UpperBound(is_collist)
ll_Cnt = 1
ls_Color = string(RGB(0,0,128))
DO UNTIL ll_Cnt > ll_Max
        ls_ModString = is_collist[ll_cnt] + "_t.Color ='"
        ls_ModString = ls_ModString + ls_color +  "'"
        ls_Return = this.Modify(ls_modstring)
        ll_Cnt ++
LOOP

// Change BackGround To White
ls_ModString = "'" + string(16777215) + "'"
inv_base.of_Modify('Background.Color',ls_ModString,'column','detail',TRUE)

parent.Title = "PTD Meter Tickets - QUERY MODE" 

// Enable Query Service Options
this.inv_querymode.of_SetQueryCols(is_collist)
this.inv_querymode.of_SetResetCriteria(TRUE)
this.inv_querymode.of_SetRetrieveOnDisabled(FALSE)
this.inv_querymode.of_SetEnabled(TRUE)


RETURN 1



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 19, 1999 8:09 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: PFC Query Mode Service (Limitation or Not) Question.......


Hi PBers

I am facing a serious problem with query mode or you can say retrieve
function of PFC Services. I haven't tried this with PB direct codes so I
can't say 100% PB problem but my gut feeling tells me that it is Powersoft
problem also.

Firstly let me describe my sql statement

Select A,B,C,D from tableA where A = :arg OR :arg is null;

We all know that when this query is issued if the :arg is passed, result
would be records for specified :arg, and when it is null it would be all

This works fine.....

Now when I turn on my querymode service and enter parameters in the
querymode, It should retrieve based on querymode parameters taking the first
where clause into account....

What happens is that if in the first where clause :arg was null everything
works fine, but if :arg was some valid parameter,it will ignore the
querymode parameters and pass back the result from the first query
itself....

Isn't this strange, a user takes all the pain to enter the parameters in the
query mode and then turn off query mode waiting for the result to be shown
as desired and what comes out is the same sickening old result....

Does any of you... has any solution to this problem/ a work around would
also do because of emergencies......

Remain Kooollll......, 
Mohamed Ashraf Memon
Advanced Micro Devices (Singapore)
TEL : 7969-888 X 39826
FAX : 4492-360
DID : 7969-826
Email : [EMAIL PROTECTED]


===========================================================
This List brought to you by DelWare Consulting Group. Visit
our site http://www.DelWare.com today!

Please, no employment posts!

To unsubscribe send mail to [EMAIL PROTECTED]
UNSUBSCRIBE PBPFC FirstName LastName
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE:   help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]

Reply via email to