For Programmers: Free Programming Magazines  


Home > Archive > Clarion > June 2006 > Re: Sorting a browse









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Sorting a browse
Nelson Kaye

2006-06-04, 6:55 pm

Dennis,

Thanks for the additional details, although I am still a problem. I get a
bind error.

My exact situation is this:

1. I have two tabs in the proc: one for file COL and one for FLD (BRW7).
FLD is a child to COL (1-many)

2. COL has a field called RPT_COL. This is the field that I want to use to
sort the FLD table.

3. I understand that COL:RPT_COL must be in the FLD View definition
(looking under module I see a Brw7::View:Browse VIEW(FLD).

As I initially defined the FLD under list box table as FLD, I added COL.
This gave me an JOIN(COL:PID_KEY, FLD:COL_ID)
PROJECT(COL:RPT_COL)
PROJECT(COL:COL_ID).
PROJECT(COL:COL_ID). (This appears twice?)

4. I added to the 'Additional Sort Field': BRW7.AppendOrder(COL:RPT_COL)

5. Within FLD, I binded, via extension screen, COL:RPT_COL, FLD:COL_ID AND
COL:COL_ID), but nonetheless get a bind error (801)???




Thanks again,
Nelson


"Dennis E. Evans" <evansdennis@sbcglobal.net> wrote in message
news:A921.1149433069.1426@discuss.softvelocity.com...
> Hi all,
>
> "Nelson Kaye" <nkaye1@nyc.rr.com> wrote in message
> news:A921.1149430603.1424@discuss.softvelocity.com...
>
>
> use the field name only. Also bind must be called before the view is
> opened.
>
>
not[color=darkred]
>
>
> From your first post,
> "This field is in the browse list, but is not in the table. it is built
> in SetQueueRecord"
>
> If you want to sort on some local variable then use the code that you
> build the local variable with to sort. The local variable must be
> constructed from fields in the view.
>
> example, assuming L:rec_req is some kind of sequence ID and is built
> something like this
>
> l:rcd_seq = clip(pre:fieldOne) & ' ' & pre:fieldTwo or
>
> you want to sort on a local variable used to display a total value,
> localTotal = order:costPerUnit * order:NumberOrdered
>
> or what ever
>
> then put the expression in the additional sort fields, so the code
> generated looks like this or just use the embed editor and call

appendOrder
> for the needed sort order.
>
> brwX.AppendOrder(clip(pre:fieldOne) & ' ' & pre:fieldTwo)
> or
> brwX.AppendOrder(order:costPerUnit * order:NumberOrdered)
> and so on
>
> the view is sorted long before any local data is filled in

setQueueRecord.
>
>
> Dennis
>
>
>
>
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com