Jump to content

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

Recommended Posts

Posted

This must be a very dumb querry.

Would Max(::RelatedByConstant:CompoundModDateAndHour) always return the Latest Compound suitable for a relationship to an Indexed Field in the Related File.

I'm trying to find out the best way to grab the latest modified ID in a related file.

Would a concanation of Time and Hour get greater and greater,

crazy.gif

Version: v6.x

Platform: Mac OS 9

Posted

I should think if you used a concatenation of date and time set as a number, the number would increment as desired.

Posted

Hi JT,

Thanks for the confirmation. It works a charm. I was concerned I could have missed some point before going this way.

Version: v6.x

Platform: Mac OS 9

Posted

Hi,

In this instance Bob, I was looking for the latest modified value, not just the latest value.

Am I missing something ?

Version: v6.x

Platform: Mac OS 9

Posted

If you have the relationship sorted by date and time fields [ascending], then Last( ) will give you the most recently modified value. If you sort them descending, ::RelatedByConstant:CompoundModDateAndHour itself will give you the correct value since the first related record is the most recent. It all depends on which one works faster for you.

I think either of these methods would be faster than a Max( ), but I'm not sure whether the difference is negligible with a large record set.

Posted

Wow,

How could I miss this obvious. I was focussed on the Concanation field, and totally forgot the individual fields themselves.

Sure, as they are indexed (scripted), these would be suitable for a sorting relationship.

Thanks both of you.

Version: v6.x

Platform: Mac OS 9

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