How to create a favorite event page?

Hi I'm new at developing in Outsystems but I've really liked how the platform works.
I'm developing my final course project and doubts often arise.

Well, my question is how do I create a bookmark page, depending on the "heart" that the user placed on the event list page.
That is, pick up the record when the "heart" = true, the event that is favorite and all that data goes to the favorites page.

Thanks

Hi Carolina,


It sounds like you will have a list of events and want to save a favorite. Simple enough. Create a boolean field on your entity for each event. When the user clicks the field/icon/image (whatever your design is) - change that favorite boolean field to a true.


Stacey

Hi Carolina,

I'm assuming you have specific logic that executes when the user clicks on your "heart" icon?... I would also expect that to change data in some entity (like a "IsFavorite" boolean attribute)?... in that case, getting a bookmarks page is a similar page to the "event list page" you mentioned, but where the Aggregate used to feed the table records would be filtered by "IsFavorite = True" or similar.

This is very similar to what you have on the Developing OutSystems Mobile Apps online course's exercises (except they use stars and not hearts), you should check that out.

How would this work for you?

Jorge Martins wrote:

Hi Carolina,

I'm assuming you have specific logic that executes when the user clicks on your "heart" icon?... I would also expect that to change data in some entity (like a "IsFavorite" boolean attribute)?... in that case, getting a bookmarks page is a similar page to the "event list page" you mentioned, but where the Aggregate used to feed the table records would be filtered by "IsFavorite = True" or similar.

This is very similar to what you have on the Developing OutSystems Mobile Apps online course's exercises (except they use stars and not hearts), you should check that out.

How would this work for you?

Thank you very much Jorge for the answer.

That's exactly what it said I want to do.
And I followed this exercise in the stars, and I followed the same logic and it is working.

In the events I have an attribute called IsFavorite type boolean. I tried to apply the filter "Is Favorite = True", but the expected result does not appear.

My question is how do you save the change from false to true? Is it saved and updates the database?


Stacey Levine wrote:

Hi Carolina,


It sounds like you will have a list of events and want to save a favorite. Simple enough. Create a boolean field on your entity for each event. When the user clicks the field/icon/image (whatever your design is) - change that favorite boolean field to a true.


Stacey

Thanks Stacey for the answser.

I've already done this part.

The question is how to build the bookmark page based on the heart click and save that data.


Solution

Carolina Martins wrote:

Jorge Martins wrote:

Hi Carolina,

I'm assuming you have specific logic that executes when the user clicks on your "heart" icon?... I would also expect that to change data in some entity (like a "IsFavorite" boolean attribute)?... in that case, getting a bookmarks page is a similar page to the "event list page" you mentioned, but where the Aggregate used to feed the table records would be filtered by "IsFavorite = True" or similar.

This is very similar to what you have on the Developing OutSystems Mobile Apps online course's exercises (except they use stars and not hearts), you should check that out.

How would this work for you?

Thank you very much Jorge for the answer.

That's exactly what it said I want to do.
And I followed this exercise in the stars, and I followed the same logic and it is working.

In the events I have an attribute called IsFavorite type boolean. I tried to apply the filter "Is Favorite = True", but the expected result does not appear.

My question is how do you save the change from false to true? Is it saved and updates the database?


If you have followed the exercise I mentioned, there is a part that handles saving the data back to the database, likely right after you've updated the IsFavorite attribute. You need to use the UpdateEvent or CreateOrUpdateEvent entity actions (i assumed your entity was called Event) to save the database. If you skip this, no changes where persisted and by the time your Favorites screen shows up there won't be any entries.

Hope this helps and sorry for the delay replying.


Solution

Jorge Martins wrote:

Carolina Martins wrote:

Jorge Martins wrote:

Hi Carolina,

I'm assuming you have specific logic that executes when the user clicks on your "heart" icon?... I would also expect that to change data in some entity (like a "IsFavorite" boolean attribute)?... in that case, getting a bookmarks page is a similar page to the "event list page" you mentioned, but where the Aggregate used to feed the table records would be filtered by "IsFavorite = True" or similar.

This is very similar to what you have on the Developing OutSystems Mobile Apps online course's exercises (except they use stars and not hearts), you should check that out.

How would this work for you?

Thank you very much Jorge for the answer.

That's exactly what it said I want to do.
And I followed this exercise in the stars, and I followed the same logic and it is working.

In the events I have an attribute called IsFavorite type boolean. I tried to apply the filter "Is Favorite = True", but the expected result does not appear.

My question is how do you save the change from false to true? Is it saved and updates the database?


If you have followed the exercise I mentioned, there is a part that handles saving the data back to the database, likely right after you've updated the IsFavorite attribute. You need to use the UpdateEvent or CreateOrUpdateEvent entity actions (i assumed your entity was called Event) to save the database. If you skip this, no changes where persisted and by the time your Favorites screen shows up there won't be any entries.

Hope this helps and sorry for the delay replying.


Thank you very much, I reviewed the class again and in fact I was not doing UpdateEvent and it is already working.

It helped a lot.
Best regards