John,

Ok. You are starting to make sense in my head now. :)

I now see a :

One(Material Request)-to-many(Material Request Line items)
   and
One(Material Request Line item)-to-one(PO#)

And what I think your trying to do is start from a PO# and get a list
of _distinct_ Material Requests?

So I think your after the following:

   When a user is viewing Material Request #1 (that has 3 children as
defined below) you also want a table field that would for a single
specific PO# show you all of the Material Request records that are
related to that PO# via any child record. Is that correct? (Or are we
dealing with a desire to view based on more than one PO# ?) AND you
want this list to only list a single Material Request record a maximum
of one time.

Is that the desired effect?

If so the "distinct" is that hard part in ARS. (That is just not
something that is really supported directly.)

So I see two options.

1) Table walk.
   Table lists all "Material Request Line Item" records for one or
more PO#'s. (Table can be hidden.)
   Stack up the 'Material Request ' IDs if it is not already in the
list to a display only field on the form. (This act should produce a
distinct list)
   Then have a second table field that lists all Material Request
records that have their id's in the list in the display only field.

2) (As Joe DeSouza suggested.) Use a RDBMS SQL view to do the select
distinct from a Join of "Material Request" and "Material Request Line
Item". Do not forget to generate a usable 'Request ID' value in the
view too.  Then create an ARS View form on top of that RDBMS view.
Then point a Table field at the ARS View form.

3) or you can opt to track the unique map of PO# to 'Material Request
' ID in a new ARS form that you join back to "Material Request" to
show a table field of other data for the related "Material Request"
records.

HTH
--
Carey Matthew Black
Remedy Skilled Professional (RSP)
ARS = Action Request System(Remedy)

Love, then teach
Solution = People + Process + Tools
Fast, Accurate, Cheap.... Pick two.




On 12/13/06, Reiser, John J <[EMAIL PROTECTED]> wrote:
Matt,

It's a purchasing app and the Parent is the Material Request. The child
is the line Items for each request. The Purchase Order number is a value
that could be associated with many Line Items.
Material Request 1
has 3 Line Items
        MR1 LineItem 1 has PO# 99
        MR1 LineItem 2 has PO# 55
        MR1 LineItem 3 has PO# 99
Material request 2
Has 2 Line Item
        MR2 LineItem 1 has PO# 99
        MR2 LineItem 2 has PO# 22

If I search the Material Request form by a DO Filed for PO# 99 I want to
show MR1 and MR2 in the results list. A table on the Material Request
form will show me all related children and that is by design.

I am stuck on how to return the parents since the multiple PO#'s can't
be stored in the Parent record.

Thank you,
John J. Reiser
Software Development Analyst
Remedy Administrator/Developer
Lockheed Martin - MS2
The star that burns twice as bright burns half as long.
Pay close attention and be illuminated by its brilliance. - paraphrased
by me


-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Carey Matthew Black
Sent: Wednesday, December 13, 2006 10:57 AM
To: arslist@ARSLIST.ORG
Subject: Re: Many to Many Child-Parent search

John,

Huh?

Lets start with the data model and how these things point at each other.

Parent record:
  (Has a GUID in field: 179(?))

Child record:
  (Has a Parent GUID in field XXXX(?))

( That does not look like a Many-To-Many relationship to me. It looks
like a one[child] to one[parent].  Is there actually another form
involved in this question that maps Parent GUID's to Child GUID's?)

It sounds like you want to see a list of all parents for a child record.
However the above data model does not allow for a single child to have
more than one parent. (Or I am missing something. Which is likely as
your post just did not parse well for me. :)

--
Carey Matthew Black
Remedy Skilled Professional (RSP)
ARS = Action Request System(Remedy)

Love, then teach
Solution = People + Process + Tools
Fast, Accurate, Cheap.... Pick two.


On 12/13/06, Reiser, John J <[EMAIL PROTECTED]> wrote:
> Hello Listers,
>
> ARS 6.3 patch13
> MS 2000 with remote MS SQL 2000
>
> I am trying to get a list of parents that have the same children to
> display in the parent form.
> I push the Parent GUID to the child record. That child record has
> another GUID field for the Group in which it belongs, lets say an
> eighth grader. I want to pull back the list of parents that have
> eighth graders. I would like to do this from the parent form and show
> the results in the parent form. I have been able to get the first
> parent listed but no more.
> I know I could use a join but the design requirements are such that
> the parent record only shows once in the results list. The parent has
> a table field that lists its children based on the Parent GUID.
> I was thinking that I need to use an ALGuide and table walk but I am
> not sure how to make that spawn the dozen or so parent records.
>
> Any help would be appreciated.
>
> John J. Reiser
> Software Development Analyst
> Remedy Administrator/Developer
> Lockheed Martin - MS2
> The star that burns twice as bright burns half as long.
> Pay close attention and be illuminated by its brilliance. -
> paraphrased by me

________________________________________________________________________
_______
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where
the Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers 
Are"


_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers 
Are"

Reply via email to