Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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


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

Recommended Posts

Posted

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...
Posted

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.

Posted

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?

Posted

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.

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