I wanted to know when to use Widgets values and when to use preparation values can you please give me an example to understand.
Your question is not clear but preparation values are called at the time of page load if you still having question please explain your question.
I think you want to know more about the page life cycle... You can find more info here.
Hope this helps.
Thanks for your reply as you said preparation values are called at a time of page load. in the same way, could you please explain to me when we need to use the entities from the widget. If you could provide me an example it will really help me.
I cannot understand what your question is. Perhaps if you include a screenshot of the problem that you have we can help you better.
I just need general concept on Widgets and Preparation, When we need to use the entities from them. Like Mr. Sakshi told us like we will use the preparation at the time of page load. I need to understand what are the difference between them when we could use them.
If you you can explain your use case then we can help you in better way.
I'm not understanding your question but let my try to clarify some aspects.
The Preparation is an action (an action is like a function in a programming language) that is automatically triggered every time the application loads a screen or webblock (read here more about the preparation action).
The most used use case for the Preparation action is to fetch data from the database.
As an example, imagine you have a table on the screen to list users from the User entity you have in the database. In this case, when this screen is loaded, you will fetch the users (using the aggregate widget). After the aggregate runs, your screen will have the list of users in its scope. What you have to do in order to display them on the screen is to add a (for example) List Record to the screen and in the "Source Record List" property you assign the list returned by the aggregate in the Preparation. You can find attached to this reply the example oml.
You should also attend the OutSystems in one hour self-paced course. It's amazing and you will get you "beginner" questions answered :)