Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Get the Portal Row number for a record that isn't active


This topic is 4289 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

 

I have a sidebar portal that has a list of 300+ contacts. I am attempting to create a script that will navigate to the previous and next record in the portal (which may or may not be filtered.) I don't always have the current row number of the record being viewed. So my question is... how can I get the portal row number of a particular record when no portal is currently active? Do I have to loop from the first record to the last until it matches? Is there an easier way?

 

Thanks,


Stephen

Posted

I would do a find on a layout of the child table on which the portal is based. You could script it so the user wouldn't see what was going on.

Posted

I would do a find on a layout of the child table on which the portal is based. You could script it so the user wouldn't see what was going on.

 

 

This is how I am currently going to the related record without using the related record script. It's working just fine. My issue that I am having is being able to go to the next or previous record. Since the sort order may be different than the actual record order, I need to get the portal row for whatever the current record is and then go to the next or previous record in the portal. My hang up is that I can be on a record and there is no active portal row. Thoughts?

Posted

If a record or portal row is "active" then there is a focus and you should be able to either capture the portal row and go to the next or previous one. If there is not an active row or record, then there is no original record to define which is next or previous. Perhaps I'm missing something here.

Rick.

Oh, and to make a given portal active name it in the inspector and use GoToObject or at least that's what I think the step is. I'm not at a computer right now.

Posted

Maybe I am leaving out some info. I have the portal setup via a cartesian join in TO to itself. This provides me a list of all of my contacts in a sidebar while viewing the current record at the right in detail. When the user clicks on a record in the portal, I used to go to the related record, but opted for a search instead so I could maintain the portal scrolling and position intact. Whenever I go to the new record, the portal now becomes inactive and the active portal row number would be 0. I can capture the last portal row number when the user clicks, and then script the previous or next row quite easily, but my issue there is if the portal is filtered. Then the order would not necessarily be the same. To add to all this, the portal itself can be sorted in 4 different ways.

 

What I have done up until now has been to get the UUID of the record, do a looping script through each of the portal rows to test for a hit, once found, then go to next or previous. This works, but just is too slow to be helpful for my users.

 

Does this help?

This topic is 4289 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.