Jump to content

GetNth portal row record ?? comparing one portal row to the next ..


Steven Cappiello
 Share

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

Recommended Posts

Hi there,

I have a portal of time events that are sorted earliest first by the portal. The records were created at different times so the record numbers and ids are not in succession.

I'd like to create a relationship that is valid if there is more than a certain amount of time between two records.

The reason behind this is that the portal is being used to create someone's daily agenda, and we can't have too much time between meetings. I don't want to script it, I want it to be a text field that shows "There is too much free time between these meetings" if the relationship is valid.

Is there a way I can compare the end time of one portal row with the start time of the next portal row ?

I tried to use the Get(PortalRowNumber) function but it delivers question marks when I place the field in the portal. I was hoping to create a relationship from that field to a "Portal Number plus one" field. But I guess that doesn't make sense.

thanks,

Any advice would be appreciated :)

Link to comment
Share on other sites

The problem is that Portal Row only has meaning within the portal, so while it's useful in script running through a particular portal, that's about it. GetNthRecord, on the other hand, can be used on related records, which the "portal" records are; from the parent TO.

However, the calculation using GetNthRecord would need to be evaluated within the child table, because that's where the multiple records of child data are.

So, from what I can see, you would need to create a self-relationship within the child data to "mirror" the relationship from the parent to the child. This may or may not be difficult; but should be possible. The self-relationship would need to be sorted the same as the portal (or relationship). [i didn't do that.]

Then you can use that self-relationship with GetNthRecord ( self-relationship::data; Get ( RecordNumber ) - 1 ). This field can then be used in calculations and/or show in the portal.

Caveat: there may be an easier and more direct way to do this, but I can't think of it.

(P.S. I could not for the life of me get the "?" not to show up in the 1st row; it's Time.)

PrevRelatedGetNth.fp7.zip

Edited by Guest
Sort
Link to comment
Share on other sites

Sometimes we only become aware of how strongly we feel about something (or someone) when they are put down and our defensive mechanism kicks in. I've always liked your avatar and view it as 'true strength is determined by grit and not by size.' It provides hope and (internal) strength to many. :smile2:

Ooops, I wasted bandwidth ... :shocked:

Link to comment
Share on other sites

This topic is 5767 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
 Share

×
×
  • Create New...

Important Information

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