![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm working with Northgate's Reality 11.0 and I'm attempting to extract the relative position of data from an attribute using the TCL English commands. It does not appear from my reading that this is possible. If I need to know the postion of a value in a multivalue attribute and keep that numerical value for a later test condition, is this possible using any of the English verbs. For instance: If have an attribute that stores dates and looks like this: ^xx/xx/xx]xx/xx/xx]xx/xx/xx]xx/xx/xx^ and my sselect picks value two in this attribute based on my input date, it there a way to return a 2 and use it for further processing on another attribute that has values related to the date attribute? Thanks Tom |
#3
| |||
| |||
|
|
Try BY-EXP fieldname. Normally, when selecting fields via WITH fieldname = "something", if ANY of the multivales match the criteria, the single record item is seleced. By exploding means it will "explode" multi-values into multiple virtual records and return a multi-valued key pair: item id ] position where ] is a "value mark", a chr$(253) and position, IIRC, is in hexidecimal. Mark Brown "Tom" <temeehan (AT) nospamverizon (DOT) net> wrote in message news:g5uKe.3764$Sc.3026 (AT) trnddc05 (DOT) .. I'm working with Northgate's Reality 11.0 and I'm attempting to extract the relative position of data from an attribute using the TCL English commands. It does not appear from my reading that this is possible. If I need to know the postion of a value in a multivalue attribute and keep that numerical value for a later test condition, is this possible using any of the English verbs. For instance: If have an attribute that stores dates and looks like this: ^xx/xx/xx]xx/xx/xx]xx/xx/xx]xx/xx/xx^ and my sselect picks value two in this attribute based on my input date, it there a way to return a 2 and use it for further processing on another attribute that has values related to the date attribute? Thanks Tom |
#4
| |||
| |||
|
|
Try creating a dictionary definition for that attribute. Place A;NV in attribute 7 (conversion). Then if you do a BY-EXP that defintion will tell you which multivalue position was returned. By doing a REFORMAT using that dict defintion, you may be able to use that position in a later calculation. |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
SH wrote: Try creating a dictionary definition for that attribute. Place A;NV in attribute 7 (conversion). Then if you do a BY-EXP that defintion will tell you which multivalue position was returned. By doing a REFORMAT using that dict defintion, you may be able to use that position in a later calculation. Thanks...perhaps I should further explain. I have two multivalue attributes (fields). One is a date attribute that contains a series of dates, the other is a transaction code attribute that contains a series of transactions. These are D2 values, that have a one-to-one relationship in regard to value placement. Both attributes are dependent attributes of D1 attribute named type, which has no meaning in the search I want to perform. Using the English TCL, if I search for a specific date in the date attribute and specify a transaction code that I want to determine occured on the search date, the transaction code returned may be correct but in another position in the transaction code attribute. If, for example, the correct date is in position three of the date attribute, I need the search for the transaction code to look only in position three of it's attribute since looking elsewhere in the attribute is meaningless. This really looks like a coding job. Thanks for the help. tom |
#7
| |||
| |||
|
|
Tom: Let's say I have an A/P check. In that check I have two attributes: INVDATES INVNOS When a check is issued a variety of A/P invoices are paid (this is why I have the two attributes). Now say I want a list of invoice#s for specified date(s). I could simply say, at tcl: SELECT APCHECKS BY-EXP INVDATES = "08/15/05" INVNOS and would get a select list of those inv#s. Or I could do: SORT APCHECKS BY-EXP INVDATES = "08/01/05""08/15/05" CKDATE INVDATES INVNOS to get a list of those invoices paid on either Aug 1st or Aug 15th. Hope this helps. |
#8
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |