Hi,
I have a Screen that shows the records of my 'Pessoa' Entity and pass to the block by input parameters. And i made a block that comes with that data in input component where i'll change the data but when i use the logic to update data didn't work.
Observation: Initially i didn't want to create an aggregate in the block, because i could use the block in others screens, so if someone have an solution for that, it will be really helpful. Screen:
Block:
The Logic that i use on the block:
You have to create an event to give the parent the new data.. and then you edit the frontend with that new data PS: you will need to use the ID to find where that record is in the data or you can just refresh the block when that event is triggered.
Just make sure when you click save, at the end of the flow after saving you call that event.
https://success.outsystems.com/documentation/11/developing_an_application/design_ui/reuse_ui/use_events_to_propagate_changes_from_a_block_to_the_parent/
Note: Dont know what you are trying to implement. Are those aggregates in the screen and block the same? are you getting the same data? why pass the inputs from the screen aggregate when you are again in the block getting the same values?If they are the same, don't know the need for a block when you can do it directly on the screen. Be careful with the event parameters changed because you can get an infinite loop, I think that will happen.
Kind Regards,
Márcio
Tks