Tagging and DCTAGS Array

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Tagging and DCTAGS Array

#1 Post by RDalzell »

Hello Roger and All,

Using the record tagging example I am unable to determine how to process the array of RecNo() within DCTAGS.
I would like to obtain my index key from the database and process using this new array (aConsolidate).

As Always, I Appreciate any and all assistance.

DCTAGS Array:
{{"PARKMST", {100,201,305,414,575,603,717,890}}}

Code: Select all

x                  := 1
aConsolidate := {}
DO WHILE x <= Len(DcTags)
  SELECT ParkMst
   ParkMst->(DbGoTo(DcTags[1,x]))
   aConsolidate[x] := ParkMst->T_Number
   Aadd(aConsolidate, DcTags[1,x])
   x++
ENDDO

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: Tagging and DCTAGS Array

#2 Post by RDalzell »

Thanks to all who took a peek,

Uncertain as to why, but this works...

Code: Select all

 
SELECT ParkMst
aRecNo  := DcTags[1,2]
aTicket := {}
FOR   i := 1 TO Len(aRecNo)
  nRecord := aRecNo[i]
  ParkMst->(DbGoTo(nRecord))
  Aadd(aTicket, ParkMst->T_Number)
NEXT

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Tagging and DCTAGS Array

#3 Post by skiman »

RDalzell wrote: DCTAGS Array:
{{"PARKMST", {100,201,305,414,575,603,717,890}}}

len(dctags) is 1!!!

Code: Select all

x                  := 1
aConsolidate := {}
// DO WHILE x <= Len(DcTags)
// Should be
do while x <= len(dcTags[1][2]

  SELECT ParkMst
  // ParkMst->(DbGoTo(DcTags[1,x]))
  // should be
   ParkMst->(DbGoTo(DcTags[1,2,x]))
   aConsolidate[x] := ParkMst->T_Number
   // Aadd(aConsolidate, DcTags[1,2,x])
  // should be
   Aadd(aConsolidate, DcTags[1,2,x])
   x++
ENDDO
However, you have aConsolidate[x] := ParkMst->T_Number and afterwards you have Aadd(aConsolidate, DcTags[1,2,x]) ???

Anyway the structure of dcTags seems to be the problem.

Hope this helps.
Best regards,

Chris.
www.aboservice.be

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: Tagging and DCTAGS Array

#4 Post by RDalzell »

Thanks Chris,

Makes better sense now.

Rick

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Tagging and DCTAGS Array

#5 Post by rdonnay »

Rick -

I would access the record tag array in a different way:

Code: Select all

aTags := ParkMst->(DC_RecTagArray())
Roger
The eXpress train is coming - and it has more cars.

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: Tagging and DCTAGS Array

#6 Post by RDalzell »

Roger,

That makes it even easier.
I had originally looked at the docs, but your example here made it understandable.

Thanks

Post Reply