How do I limit data, take an integer from enumeration and get the totals?

0
Hi, I’m currently working on an app, and I’m very new to Mendix. I was wondering how I could limit the amount of times the create button can be used. I also have a list with two numbers, and want to use them to check whether or not the number exceeds a certain amount as well. I also want to take those columns of data created and do my own maths, but I’m not sure how to grab them.   Like how could I get started with it? Thank you in advance.   EDIT: Thank you both for the help in getting me started.
asked
2 answers
2

Hi Yusuf,

You could do the following in your Create new microflow:

  1. Retrieve the list of your object A (the object which you will also create from your new button). Aggregate over the list and count the number of objects you do have.
  2. Retrieve the object which has setting related to how many objects you can really create
  3. Compare the number as obtained in 1 and 2 and based on whether it is less you could allow new object creation or otherwise show an appropriate message

 

Hope this helps!

answered
1

The button will need to trigger a microflow instead of the button action being set to “create object”.  In the microflow, you can perform the logic check before creating the new object.  If you need to pass an object/parameters into the new microflow, you’ll need to locate the button inside of a data view.

answered