Multiple approval system in mendix

I am building a team management app , where there are coach and players . A coach can assign players to a team and also arrange matches for them . When a coach arranges a match between two teams , all the players from both the teams gets a request to attend/play in the match. Only when all players approve the status of match should change to “scheduled” from “requested”. I am able to get request for each player but i need the approve button to disappear for that player after approving or rejecting the match . How can i achieve this? All the players need to approve in order to change the status of match
1 answers

Hey Anand, 

You can do this by using an NPE, just create an NPE and add an attribute of enum( approve, reject),

Now place a dataview(source: microflow) of that NPE above your listview, which contains the approve or reject button, Now apply a conditional visibility on the buttons accordingly, Now apply an onchange event, 

which calls a microflow and in that microflow, change your status and NPE status to approved or rejected and refresh the NPE object, as soon as you do it, the NPE enum will be changed to approved or rejected and conditional visibility will come into play,

and your respective button will be hidden,

Hope it helps!