Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrays 1

Status
Not open for further replies.

kime1974

Programmer
Oct 30, 2006
36
US
I am tryinng to extract data for a conversion project using 8.5. The record layout that I have been given includes many arrays. This is what I am trying to accomplish for the first array:

LastName FirstName Sex ReferenceID ReferenceType
Jones Ken M 001223333 001
Jones Ken M MEM002233 002
Jones Ken M 886426549 003
Smith Jack M MEM012893 002
Smith Jack M 886231087 003
Doe Lisa F 002447777 001

Thanks in advance!
Kim
 
You have shown us the values of some fields, but there is nothing here that relates to arrays. Please try explaining this again.

-LB
 
Sorry - Basically I need to pull in customer reference id numbers for individuals. I have 3 different numbers, but not all individuals will have all 3 numbers. I need them in the same field position in the extract no matter what reference number I am pulling (e.g, social security #, medicare # and internal tracking number). Each of these have been assigned a reference id # (001, 002, 003). Does this make sense? Kim
 
Not yet. Is the above sample the way your data currently looks? How would the above sample look in the desired layout?

-LB
 
The desired layout.

The Reference ID are separate fields in the database, but I need to have them in the same field on the layout no matter what reference ID I am pulling in.
 
So how would the above sample look? Show us, please.

Do you just want them concatenated in a comma-separated string?

-LB
 
OK - I got some clarification. I do want to concatenate 3 fields, but if there are only 2, I don't want the extra space. I need it to ignore the numbers that are not there and put the next one in if applicable. Examples:

These are the fields I want to concatenate:

PAY - Payroll Number
SSN - Social Security Number
QMS - QMACS System Id

This is how it should look without wrapping.

Example 1:
PAY 000000111223333 SSN 00000025001 QMS 000000

Example 2:
PAY 000000111223333 QMS 000000


 
I would concatenate the name in {@name}:

{table.lastname}+", "+{table.firstname}

Then insert a group on {@name}. Create three formulas:

//{@reset} to be placed in the group header:
whileprintingrecords;
stringvar x;
if not inrepeatedgroupheader then
x := "";

//{@accum} to be placed in the detail section:
whileprintingrecords;
stringvar x := x + {table.referenceID}+ " ";

//{@display} to be placed in the group footer:
whileprintingrecords;
stringvar x;
trim(x)

Then suppress the group header and details and place the other fields in the group footer.

This assumes that the three "fields" that you mention in your last post are all instances on one field (referenceID) in your database (as indicated in your first post).

-LB

 
LB - the three fields are not one field in the database. I need to combine 3 fields into one. Does that make this different? Sorry for all the confusion. Kim
 
Yes, of course. Then what was your first post showing us?
Please show a sample of what your data looks like now in the detail section, and please label all fields.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top