28
Views
5
Comments
Add pagination and sorting to structure list
Application Type
Reactive
Service Studio Version
11.55.26 (Build 64206)

Hi Team, 


I have a structure list where I need to display Attachments

In DB I am not saving file size, I am getting that in data action by using binary data size action.

but in UI I need to display that -> file name, size, file added by

As I don't have file size in DB, I cannot add that in a table and add pagination and sorting as usually.

How to bind data and add sorting and pagination in the UI using str list

any reference or oml would be useful,

Thanks

 

UserImage.jpg
Supriya Malla

Hi @Shain Lobo 

Please refer to the below links regarding the pagination in the structure list: 

https://www.outsystems.com/forums/discussion/75149/pagination-in-structure-list/

Thanks,

Supriya

UserImage.jpg
Łukasz Kaproń

Hi @Shain Lobo 

I think that you should store file size in DB also. It could be a good solution for your problem.

If you cannot do this, you have to implement your own pagination.

Can you share your oml file?

UserImage.jpg
Shain Lobo

I don't have access to create extra attr to store the file size 

2025-12-04 12-06-13
João Miguel Bernardes Martins
Staff

Hi @Shain Lobo ,

As a best practice and if you only pretend to list "file name, size, file added by" (as columns), you shouldn't request the file data in the data action (or are you going use that data?). Can you create a new db entity with all columns that you need (1 to 1 relationship to the current file entity)? If you can, you could update this new entity in background (e.g. timer), in that way you would also solve the pagination/sorting problem, you get information already processed and you could also request file data only on demand. 

2019-01-07 16-04-16
Siya
 
MVP

@Shain Lobo : I assume your entity as FileInfo ( Id , Name (Text), Content). Now you want to show the Name and Size in UI. You can use an advanced query to get the size as below

SELECT {FileInfo}.[Name], DATALENGTH({FileInfo}.[Content]) AS Size FROM {FileInfo}

 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.