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.

Setting a Calculation Field to the most recent or first field in a portal

Featured Replies

Hello folks,

I have two Tables, Orders and Products. On the Orders Layout, there is a Portal going to Products, related by an OrderID key.

I need to create a calculation field in the Orders table that stores the price of the Most recently added product in the list. I also need a calculation field that stores the first products price. What's the best way to do this?

Thanks a lot!

Andrew

  • 3 weeks later...

A summary field maybe, with a count?

If you sort the portal relationship so the most recent product entered is at the top. Then create a calc based on the price field from that relationship then it will always be populated by the first record.

You may already have the relationship based on the portal. If you are not doing any kind of sort in this relationship then use this relationship to show the price of the first product.

Duplicate the above relationship and use Paul's suggestion above. But I am not sure that on which field you would perform a sort to bring the most recent product on the top? Do you have any auto-enter key on products table?

Re: sorting: You could either use a primary key from that table or have an auto enter creation date field which you could use to sort on.

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.