Jump to content
Server Maintenance This Week. ×

Portal row choosing


Recommended Posts

  • Newbies

I work for a millwork company. We have numerous wood suppliers. There are many species, qualities, and thicknesses of wood and each vendor has a different price for each item. I have a layout where I enter the parameters of the item we are building along with the species, quality, thickness, etc of the wood we want to use for the item. There is a relationship between the calculation layout and the wood supplier layout. I have a portal that shows the different vendors that have the product I wish to use. I want my layout to populate with the lowest price rather than the first price that matches the criteria. How do I do that?

Link to comment
Share on other sites

4 hours ago, 49er54 said:

I want my layout to populate with the lowest price rather than the first price that matches the criteria.

It depends on what exactly you mean by "populate".

If you only want to display the lowest price, you could use a calculation field that returns the minimum of the related prices. Or sort the portal (or the underlying relationship) by price, so that the lowest price is always shown in the first row. If you chose to sort the relationship, you can also put the related price field directly onto your layout.

If your purpose is to actually select the lowest price (along with the vendor) and store this selection in a local field, then you will need a script that does that. (Strictly speaking, you could use an auto-entered calculation to make the pick for you - but I am not sure you would want to.)

For both scenarios you will need to decide what to do in case of a tie.

 

Edited by comment
Link to comment
Share on other sites

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.