PICK FROM into a BO PM reference

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

PICK FROM into a BO PM reference

Post by PointsWell »

I'm trying to generate a relationship in a BO from a PICK FROM list.

I have a BO called WORK with a recursive relationship CONTAINS.

I have another BO called PARTICIPANT which has an OB relationship to WORK.

I am trying to PICK FROM a list of PARTICIPANT (from a query - WorkPartPickCompilation) and then INSERT the PARTICIPANT.OB_WORK into WORK.PM_CONTAINS but I am getting an Internal Error that isn't more fully explained in the console.

Code: Select all

PICK ONE OR MORE FROM WorkPartPickCompilation 
 FIND WorkFull WHERE WorkFull=WorkPart.ob_Work
 INSERT WorkFull IN WorkFull.pm_Contains
Do I need to create an intermediary relationship for the recursive relationship?

If not can anyone point me towards a similar example?
BLOMASKY
Posts: 1471
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: PICK FROM into a BO PM reference

Post by BLOMASKY »

I am confused

You mention that Work has a recursive relationship to it self (right?)
And Work has multiple children called Participant

If you are trying to insert Work into Work, why is there a Pick pointing to Participant.
So please explain, are you trying to insert recursive Works into Works, or are you trying to assign 1 or multiple participants to a work record.

Thanks
Bruce
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: PICK FROM into a BO PM reference

Post by PointsWell »

Very good question.

The reason that I need to use the Participant as an intermediary is that there is not enough uniquely identifying information (that is meaningful to the User) in the Work for the User to correctly identify the Work.

Multiple but different Works may have the same title. It is not until you attach an Author (Participant) that the Work becomes unique. Works may have multiple participants (Authors etc), so I can't directly attach the Author as an attribute to the Work.

Hence I am trying to identify via the Participant a number of Works by Author to attach to another Work (Consider a compilation of short stories)
Post Reply