How to use checkbox?

0
Hello Mendix Community! 😊 I am working on a system to calculate Value Z using the following equation: Value Z = Value A + Value B1 + Value B2 + (Value C1 + Value C2 + ...) Here’s the challenge:I don’t have a fixed number of Value C inputs for my equation. To address this, I’ve created a feature where users can add as many numbers as they want for Value C. I also added a checkbox functionality, so users can select specific Value C entries to include in the calculation. When selected, these numbers will be multiplied together and contribute to the final equation. What I’ve Done So Far: Domain Model:I’ve created an entity for Value C and added a Boolean attribute Overview Page:Users can see all the numbers entered for Value C. Edit Page for Value C:I created a page for users to input new Value C entries. However, I faced issues linking the input fields to the Value C attributes.   What I Need Help With: Edit Page:How can I correctly bind the input fields (e.g., number and checkbox) to the Value C attributes? Selection Logic:How can I implement the logic to multiply the selected Value C numbers?   I greatly appreciate any guidance or advice on how to set this up. Thank you so much for taking the time to read my post and help me out! 😊  
asked
1 answers
0

Value C is a multiple multiple reference. I do wonder why. Will a new added value for C also be reused by other users so they can just select that value again for their calculation? Is a multiple (from the C side) to one (the Secondmilestone) not simpeler. This way you could create a listview in the page where the user could create new values for C and add it to the list.

For the calculation you could then retrieve in a microflow the list attached to the Secondmilestone object iterate over those to do the calculation.

If multiple multiple is needed you need to add a reference grid to your page and create a select page where the user can add the C values or create new ones. Then the microflow is almost the same and retrieve the C values attached to the Secondmilestone object.

Hope this helps a bit.

Regards,

Ronald

 

answered