Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

How to compare values of same field in different portal rows


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

Recommended Posts

Posted

Did not see anything addressing this, so I'll ask. I have a portal that is sorted on one field (Field1). I want to compare the values (dates) in Field2 between the first and second row in the portal and determine which is the earlier date. I don't use portals often enough to know if you can do calculations between fields on different rows. Any and all help is appreciated.

Posted

You can use GetNthRecord to compare the first and second rows, in a calc field, like this:

GetAsDate (

Max (

GetNthRecord ( [related date field] ; 1 ) ; GetNthRecord ( [related date field] ; 2 )

)

)

That will show you the later of the dates. Of course you can modify it to display something if the first is greater than the second, and so on. Does that help?

Posted

Why not sort on both fields in the portal setup, is it because the field actually is a typecast? But by and large are your questioning style not fully embraced, since it leaves too much place for various interpretations - what we need is context and purpose, otherwise will you arbitrary stabs of which might be what you need but can't be organized as proper learning...

--sd

This topic is 5561 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.