microflow of a inventory

Hii guys, I need to make a product inventory for my project. For example if I add 10 tables to my inventory. A worker can make a reservation for this tables. If he makes a reservation for 5 tables the inventory amount must go to 5. (10-5 = 5). Can someone please help me. Its for a school project and im a little stuck here. I know what to do, but I don't know how to setup such a microflow like this
2 answers

Hi Tim,

There are several ways, hope the following helps:

I assume you’ve an product inventory → add an object for table and also the count inside the same object

  1. User creates a reservation → selects the product → In this case tables
  2. Allow the user to make an entry for how many tables he’d like to reserve
  3. On save → validate if the value entered by user is allowed for reservation. You can do this by comparing the values that the product inventory has vs the reservation
  4. If validation in 3 passes → commit the reservation and decrease the count in the entity for ProductInventory for the object Table something like: $ProductInventory/AvailableValue – $Reservation/SelectedValue


Additionally, if you  take the rapid developer course it would help you a lot

https://academy.mendix.com/link/paths/31/Become-a-Rapid-Developer or

https://academy.mendix.com/link/paths/82/Crash-Course (if you’ve some experience with software development)




You likely have entities:

  • table
  • worker

Keeping the ‘available-tables-score’ like Radhika suggests posses the problem that you do not know which worker has reserved which table.To resolve that: upon saving a table, associate the worker to the table.