Field is not pulling the right data

I have an odd problem here. I have a database that pulls and store customer information from the AS400 to the Lotus Notes.  The form is called CompanyRec with Document as a type. From that form, I can create a Package Profile (PackageProfileRec, type Document, Formula inherit values from selected document) where the customer information (customer no, name, and address) are inherited from the CompanyRec. From the Package Profile then I can create a Work Order (WORec, type Response, Formulas inherit values from selected document). The Work Order will inherit the customer and box information form the Package Profile.

The problem at this point is, there are two customers with the same number. In the AS400 they are differentiated by a different company number. So the customer number is the same (i.e 123) but one is assigned on the company no 1 and the other company no 2. Those company no are not transferred over to the Lotus Notes database. So in the database there is 1 customer number with 2 different name, address, etc.

It becomes a problem because now in the WO when a user create a WO with that cust no. There are 2 customer information that are being pulled in the WO. The first thing that I thought is testing it by creating a new field to store the Company No (1 and 2), then add that information, then create a PP and WO. The weird thing is the company no got pulled correctly (only show up 1) but the name and address shows up 2 customers. I do not understand why because there is no lookup formula to get the customer information and if it simply inherit the value from the PP it should just pull out an information from 1 customer. Does anyone has an idea what I could try to fix this?
LVL 2
coronoahcoroAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jon SnydermanCommented:
I would create a new logical file on the 400 side excluding all Co 2 customers and then have your domino pull go against that logical.   Your situation make sense to me.  You need to find a way to exclude the Co 2 customers from the result set at the source.  You can do that with a new logical file or SQL view.

~Jon Snyderman
0
Sjef BosmanGroupware ConsultantCommented:
It does not make sense to me, at all. Some questions:
- at which moment exactly is the duplicate CompanyRec created?
- you pull data from the AS400 (how?), is that data correct, I mean, are all customer numbers unique on the AS400?
- you say that companies are differentiated on the OS400 by their company number, how is that in Notes then?
- can customer data be modified in the CompanyRec document, i.e. the customer number, or is it fixed?
- can customer data be modified on the AS400 side,and how is that reflected in Notes afterwards?
0
coronoahcoroAuthor Commented:
Just to clear up a few things:
The problem that I am facing is in the database there are 2 customers with the same number (i.e. 123) but they have different name (i.e Company A and Company B). Those 2 companies have different name, address, contracts, etc. Now when a Work Order is created out of the Package Profile, the information from both company are being pulled out in the Work Order. I did not understand how this could happen since the Package Profile only pulled the information of 1 customer.

Updates:
I found out that there is a PostOpen event in the Work Order form that does a lookup on a view and updates the fields. The first column on the view is based on customer number that is why both of the information are getting pulled out. My remedy for this, is by creating a different view that has the Document UNID for the first column it is unique and change the key for the Dblookup
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
coronoahcoroAuthor Commented:
Found my own solution which is posted on my last comment
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.