Subject | Re: [IBO] Get . from OrderingItems |
---|---|
Author | Helen Borrie |
Post date | 2005-01-13T15:22:55Z |
At 02:33 PM 13/01/2005 +0000, you wrote:
It would be better to write a routine that gets back to the RelationNames
property of the Row object via the (unique) fieldnames of the Fields[]
array (which is also a Row object). The indexes of ARow.RelationNames[]
will correspond with the indexes of Fields[]. The OrderingField property
gives you a reference to the TIB_Column. OrderingItemNo tells you which
OrderingItem is current. OrderingLinks tells you which tablename.fieldname
maps to which OrderingItem (and don't forget that OrderingItems number from
1, not zero).
Helen
>I have a routine that allows the user to select the ordering of aWell, OrderingItems is a stringlist so you could parse the strings, I guess.
>query by clicking on the column header in an TIB_Grid fed by a
>TIB_Query, and then select various modifiers so I can change the
>SQLWhere in the query.
>
>I'd like to get the qualified <tablename>.<fieldname> of the current
>ordering so I can properly configure the where string into something
>like Query.SQLWhere = 'Where <tablename>.<fieldname> starting with
>(or like or containing) '?''
>
>
>I know I can get the OrderingItemNo, but I'm not sure how to
>get "PURCHASEORDER.PONUM" from the OrderingItems when the
>OrderingItemNo = 2.
>
>The orderingitems is like this:
>
>VNAME=VENDOR.VNAME;VENDOR.VNAME DESC
>PONUM=PURCHASEORDER.PONUM;PURCHASEORDER.PONUM DESC
>DATE_PO=PURCHASEORDER.DATE_PO;PURCHASEORDER.DATE_PO DESC
>ITEMNUM=PO_ITEMS.ITEMNUM;PO_ITEMS.ITEMNUM DESC
>ITEMNAME=PO_ITEMS.ITEMNAME;PO_ITEMS.ITEMNAME DESC
>DATE_ETA=PO_ITEMS.DATE_ETA;PO_ITEMS.DATE_ETA DESC
It would be better to write a routine that gets back to the RelationNames
property of the Row object via the (unique) fieldnames of the Fields[]
array (which is also a Row object). The indexes of ARow.RelationNames[]
will correspond with the indexes of Fields[]. The OrderingField property
gives you a reference to the TIB_Column. OrderingItemNo tells you which
OrderingItem is current. OrderingLinks tells you which tablename.fieldname
maps to which OrderingItem (and don't forget that OrderingItems number from
1, not zero).
Helen