Hi all,
After deleting and than republishing my app I've run into some strange behaviour.
I have a screen with an aggregate that is set to fetch at start. If the aggregate is not empty then a button is to be shown.
However, when the aggregate is not empty the button is not shown. If I manually refresh the button in the On Ready screen event then the button is shown. Seems to me like the 'fetch at start' property of the aggregate doesn't run. This was working before I deleted and then republished the app.
Also, now my screen loads before all data is fetched, resulting in screen changes the user can see (mostly based on aggregate logic meaning if record or if empty then show / hide container).
Also, seems like the data is fetched slower.
Thanks and regards,
Fran
Hi Fran,
Kindly go through below link for Screen and Life cycle event it will give better understanding
https://success.outsystems.com/Documentation/11/Developing_an_Application/Implement_Application_Logic/Screen_and_Block_Lifecycle_Events
Best Regadrs
Devendra
At which event you are checking the aggregate is empty or not ? Are you checking in aggregate on After Fetch event?
Best Regards
Hi Devendra,
I am checking in the 'Visible' property of the button (not Aggregate.list.empty).
Best regards,
Better use onafterfetch event of aggregate .create a local variable and assign the value on onafterfetch event and bind that variable to button visible. This will ensure that correct value is bind to the visible property of button.
Thank you for the good suggestion.