How can i retrieve only the cost of one single item instead of retrieving al the cost of all the different items

0
Hi i am currently working on a overview of all the cost of one item, but currently i am retrieving all the cost of all the items in our database, how can i best retrieve only the cost of the item  for the details page? 
asked
2 answers
0

If you are using a Retrieve from database, you can set the range option to "First" so you only retrieve the first matching item.

 

https://docs.mendix.com/refguide7/retrieve/#42-range

answered
0

You need to store this within the DB.

 

For example, an entity "PriceHistory" where you make a record each time the price of an item is changed. Make sure to associate it with your item.

 

Then retrieve via association, all associated PriceHistory objects. Order in whichever direction you want.

answered