Display a list of records

Display a list of records

  

Hi,

I would like to ask if the aggregate return a list of rows record, how can i do to extract and display the information? 

For example, user click on one of the product, then it return a list of the places where you can buy the products. I am thinking of using Listappend, does it work???

Hi Jace,

If I understand correct, on list page you are showing list of products and when user clicks on Product, you want to show a list of places where user can buy a product?

where do you want to show a list of places. On pop up, on another screen or on same list page?

Suraj Borade wrote:

Hi Jace,

If I understand correct, on list page you are showing list of products and when user clicks on Product, you want to show a list of places where user can buy a product?

where do you want to show a list of places. On pop up, on another screen or on same list page?

When you user click on the product, it will direct them to the next screen. So from productID, the aggregate will filter based on the product and retrieve all the product information like price, description etc. However, i have a field which is the location to buy the product. This location value will return multiple locations. Thus i am having struggle how to display this information.


Hi,

If you are on a new screen only with information about the product you should remove the locations from the main aggregate and create another aggregate that return the locations for that product and show it as a list. 

Regards,

Marcelo

Hi Jace,

Could you share a screenshot of your datamodel?

Just to know how do the Products and Locations relate to each other?

Cheers,

José 

Hi Jose,

Currently, the data model is what i have. (data provided is just sample data)

ID

ProductID

ProductName

Description

Price

Location

1

1

Iphone7

Apple new product

USD900

United States

2

1

Iphone7

Apple new product

USD900

Singapore

3

1

Iphone7

Apple new product

USD900

Malaysia


Hi Marcelo,

Do you mean i have to create another aggregate specially for the locations like the one below? How do i show it in a list? using list append?

ID

ProductID

Location

1

1

United States

2

1

Singapore

3

1

Malaysia


Hi,

Your data model should be something like this :

This way you can get that second table you shown. You can display it with a ListRecord.

Regards,

Marcelo

Hi Jace, I strongly recommend you to take some time and take the courses available in the Outsystems website. This kind of requirement is very well explained in the courses, and you'll be able to get the best from the platform.

Agreed with Joao,

The course is well designed and they covered many basic things in it . It will give you more confidence once you will be done with the course and you can also ask course related doubts in the forum .



Regards

-PJ-


Solution

Marcelo Ferreira wrote:

Hi,

Your data model should be something like this :

This way you can get that second table you shown. You can display it with a ListRecord.

Regards,

Marcelo

Actually, it should be something more like this: :)

And yes, I agree with everybody: Jace, take some time and take (maybe again: you always learn something the second time) the online course.

Cheers,

José

Solution

Hi all,

Thanks for the advice, i will go through the online courses again to see what i have missed out.

Thanks Jose for the solution.