Hi,I'm just starting with Outsystems and I am currently still working about booking assignment. I've successfully implemented adding room amenities to an existing room. the question is how after I select for example "television" then press the "save & new" button and the screen refreshes and then deletes it from the combo box list.
so when pressing the "save & new" button, the screen remains in the room amenities. and when pressing the "save" button the screen will lead to the detail room. In other words, once it is selected for a particular room, it will not appear in the list of available amenity either at this time. It will still be available for other rooms to choose from, only it won't show again for the same room.
I included my oml file for convenience.
Thanks so much in advance for any help.
Pais Maulana
Hi Pais,
You'll want to have an aggregate in your preparation for your dropdown where you filter out the amenities already in the room.
and then on your save action you refresh the aggregate and the webblock the dropdown is in (give the container a name so you can reference it in the ajax refresh)
I'm sorry sir, how to filter out amenities that already in the room in aggregate? i don't get it
Hi Pais,in the preparation of your screen create an aggregate for the dropdown using the amenities entity and the room entity.Set the Join to With or Without and make sure it joins using
Amnity.Id = Room.AmnityId and Room.Id = RoomId
now in your filter add:
Room.Id = Nullidentifier()
thank you so much Sir
You are very welcome