Jarvis Posted June 18, 2009 Posted June 18, 2009 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?
Fitch Posted June 19, 2009 Posted June 19, 2009 Make a calculation in the parent table: Min(related::price)
Jarvis Posted June 20, 2009 Author Posted June 20, 2009 Thanks Tom. That's what I was looking for. Jarvis
LaRetta Posted June 21, 2009 Posted June 21, 2009 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.
Jarvis Posted June 22, 2009 Author Posted June 22, 2009 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now