Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using Get (RecordID) to sort creation order of child set of records

Featured Replies

Ok, I have a solution where there has been no serial incremented ID of fields tracked, as the solution is using UUID for most parent child relationships.  I have a calculation where I need to return the first and last values of child relationship as seen from the parent relationship, but I have to do it from the child table.

 

To get the first record of a child set of records is easy, as the creation order of the records dictates the first record, however without some type of serially incremented ID, there is no way to reverse that order (at least as far as I know).  I can't use timestamp as the records are created all at once in a loop very quickly, so most of the time they'll have the same timestamp.

 

What I want to do is create a self join relationship that joins on the foreign key of the parent table and then sorts the self join the values returned from Get ( RecordID ).  The only way that I can think of to do this is to create a field that is automatically calc'd via the Get ( RecordID ) function, and because it's being used in a relationship, it has to be indexed going forward.

Is this a viable solution to my problem?  I can't think of any other way to sort records in reverse creation order.  I thought I've heard that this may be a bad idea, but other than a corrupt database I can't think of a situation where this field would not return a unique value for each record.  I guess I could use a serial incremented field, however then I'd have to worry about making sure that the value of the field is set if I ever import/export the records into a duplicate table.  Am I completely missing an easy solution to this problem?

Check out the Last() function.  :-)

  • Author

And that's why I ask :)

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.