AnsweredAssumed Answered

Portal used to Select and/or Add Records - not working

Question asked by 4justme2 on Mar 8, 2012
Latest reply on Mar 8, 2012 by 4justme2

Title

Portal used to Select and/or Add Records - not working

Post

I have a portal(on the PARENT table from the PARENT_2_CHILD relationship below) used to Select records from a value list which is working fine.  I'm trying to write a script that will allow me to create new CHILD records from within the portal (first checking to make sure the portal row is empty). I am only successful to the point where the new record is created.  I have a button on the portal row with a dropdown value list.  The enduser can pick a value from the list and the other fields auto populate.

However, when the enduser click on the portal row to add a record nothing visably appears to happen (although, behind the scenes the new record is generated). 

PARENT::PARENT_ID.pk

PARENT::PARENT_NAME

CHILD::CHILD_ID.pk

CHILD::CHILD_Name

PARENT_2_CHILD::CHILD_ID.fk

PARENT_2_CHILD::PARENT_ID_fk

 

My relationships are set up where I can create records on both sides of the join table, PARENT_2_CHILD

I have a value list based on the CHILD table which provides values to the drop down list on the portal.  All of this is currently working. I tried my hand at writing a script to add new records to the portal the only thing I seem to be able to accomplish is to generate the new primary key in the CHILD table and be returned to the portal on the PARENT table.

Here's my sad attempt at the script to add a new child from within the portal on the PARENT layout:

Set Variable [$ID_PAR.pk; Value; GET (ScriptParameter)]

Go to Layout ["CONTACTS" (Contacts)]

New Record Request

Set Field [PARTICIPANT_2_CONTACTS::PAR_ID.pk::$PAR_ID.pk]

Go to Layout [original layout]

 

Any suggestions on what I might revise to get new records in my portal?

 

Outcomes