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

Using portal results in calculations


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

Recommended Posts

Posted

I have a portal that contains three fields:

Vendor

Material

Price

The portal sorts by price.

For any given material, the least expensive vendor shows up on top.

Is it possible to create a (4th) calculation field that queries this portal result and selects the top (least expensive) vendor for purchasing purposes?

I like the portal to display my options but I would like the calculation to automatically select the least expensive of those options.

Any ideas how to do this?

Posted

Make a calculation in the parent table:

Min(related::price)

Posted

Thanks Tom.

That's what I was looking for.

Jarvis

Posted

Actually, I don't know why you can't sort the relationship instead (and remove the sort on the portal). The portal will still sort ascending on price if the relationship is sorted that way. Then, the 'lowest price' VendorID, the lowest price and anything else from that Vendor is automatically the first record. You can then just place the related field directly on your layout as the 'winner'.

Calculation may not be necessary (depending upon what you need it for). But even if you want it, you can then use a lookup or even straight calculation of: Vendors::Price or Vendors::VendorName and drop the aggregate calc. I think that should fit the bill if that relationship can be sorted and might be more efficient.

Posted

Hi LaRetta,

Thank you for the response.

I am not sure what you mean by "sort the relationship" but I will stare at it for a bit and come back with more questions.

Jarvis

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