Loop through object with boolean attribute

0
Hi, Im looping through an object but first i check if the boolean is checked. When it is checked he needs to calculate a value. When it is unchecked it needs to calculate another value. But if the boolean is checked he dont need to do something with the unchecked boolean. Now it when i calculate the checked boolean it goes good. But when i uncheck the boolean and save my object it calculate both values en put the value in each object row. See pictures. Who can help me with this?
asked
3 answers
2

First try never to answer your own question but edit your original question. Easier read on the forum. Could it be that productief is the boolean attribute? Because then the split should just be $Inzet/productief, because that is already the boolean.

Regards,

Ronald

answered
0

I think you need to provide a bit more context on what you're trying to do. It's not completely clear to me at least.

if I would make a guess; would your problem be solved by just setting both attributes in both cases, but setting one of them to empty (or 0, or any other value)?

answered
0

I make a calculation in a project. In that calculation i put people (Inzet called) on the project. The project have for example 50 days in it. When i put a developer for 100% on the project it counts Aantal dagen inzet = 50. when i put another developer for 100% it counts again and put both developers to Aantal dagen inzet = 25.

But... When i add an projectmanager i deselect the production boolean (in the Inzet_edit form). A projectmanager dont built the application, so it doesnt count for AantalDagenInzet. But it needs to be counted for DagenProductief. So when i put a projectmanager on 100% on the project it needs to count 50 days for it. When i add another Projectmanager it needs to count 25 for both of them. And dont change any value of the developers.

answered