AnsweredAssumed Answered

Goto Specific field in Portal

Question asked by grouper on Oct 23, 2014
Latest reply on Oct 23, 2014 by grouper

Title

Goto Specific field in Portal

Post

Hi,

I 've built a portal that has 3 related fields in it. The first is the portal_row_number (defined by a calculation), the second is a container field and the third is the corresponding master ID of the related table. I 'm trying to create two scripts (attached to buttons) that navigate through the portal rows, using the goto next/previous portal rows.

The portal is set up so that when the user clicks on the container, a setfield command is performed that makes the contents of the small portal container (looks like a thumbnail) visible on a larger container of the same field in the same layout, using a selected_table_occurence structure (the whole layout looks like having a small preview on the left and the bigger image on the right).

So the script attached to the navigation buttons should call in the setfield in order to work. I found no other way around it in order to get the correct ID for the setfield each time, but to include the master ID of the related selected_table in each portal row, make it hidden, and force the script to navigate to the ID object on the portal row, get(activefieldcontents), set a variable and setfield according to the variable.

The problem is that I can' t make the script navigate correctly through the portal .There are other portals on the same layout, so the script steps are :

goto object [portal]

go to next portal row

goto object [ID field inside portal row]

get activefieldcontents to variable

set field .......

For some reason this script always navigates to the 1st portal row. Presumable because the goto object [ID] always navigates to the 1st row. Can anyone help on how to set up the script so that it navigates correctly? Also, since the focus may already have been at a specific portal row (i.e. 5th) before clicking the navigation buttons, how should the script move the focus to the next/previous from that row?

thanks

 

Outcomes