35
Views
9
Comments
Solved
Export to excel with the list of data

Hi, I have 2 entity below, each system contains multiple Sub-systems.

How can i download the excel with following format (list down the system with all sub system belongs to it with splitting by ";")


2020-11-25 10-45-32
Mostafa Othman
Champion
Solution

Hello,

You can't not implement this directly by using Record List To Excel widget to convert output of aggregate to excel but you can implement this either by writing SQL query that return output as you want exactly then use Record List To Excel  to convert output of advanced sql to excel  or you need to handle this manually by using local variable of type list of structure and loop through output of your aggregate then add condition if Id of system table exist into your local variable append subSystem to subSystem attribute then convert local variable list to excel

2020-07-21 19-28-50
Rajat Agrawal
Champion
Solution

Hi @Giselle Chen,

Whatever scenario I have explained above, same things I implemented in the one demo application look at the attached OML.

Below I attached OML for your reference:

Hope this will help you!!


Regards,

Rajat

ExcelDownLoadDemo.oml
UserImage.jpg
Rounak Rawat
Solution

Hii @Giselle Chen 

I’m attaching the .oml file for your reference. You can use it to better understand the implementation or to replicate the solution in your setup.

Best regards,

Rounak Rawat

Thanku

SystemExcel.oml
UserImage.jpg
Giselle Chen

Thank you @Rounak Rawat for guiding me with the other way to achieve the function.

2024-12-02 13-16-47
Vipin Yadav
Solution

Hi @Giselle Chen,

You can export the data using the following query: 

SELECT  {System}.[SystemsName], {System}.[AssigneOfficer], STUFF((SELECT  ', ' + {SubSystems}.[SubsystemName]    FROM {SubSystems}   WHERE  {System}.[Id] = {SubSystems}.[SystemId]  FOR XML PATH ('')), 1, 2, '')  AS SubSystemsNameData FROM  {System}

I have made the changes in the attached OML file. Please check. 

Demo URL - https://vyadav.outsystemscloud.com/ExcelExport/ExcelExport

Thanks,

Vipin Yadav


ExcelExport.oml
UserImage.jpg
Giselle Chen

Thank you @Vipin Yadav for guiding me with the sql way! 


2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi @Giselle Chen,

Firstly you can create of structure which contain 3 attribute System Name , System Officer ,Sub System Name and create a local variable of list structure type. after that create a comma separated string of Sub System name and assign in structure attribute.


Regards,

Rajat

UserImage.jpg
Giselle Chen

Thank you @Rajat Agrawal for the detailed explain and sample.


2020-11-25 10-45-32
Mostafa Othman
Champion
Solution

Hello,

You can't not implement this directly by using Record List To Excel widget to convert output of aggregate to excel but you can implement this either by writing SQL query that return output as you want exactly then use Record List To Excel  to convert output of advanced sql to excel  or you need to handle this manually by using local variable of type list of structure and loop through output of your aggregate then add condition if Id of system table exist into your local variable append subSystem to subSystem attribute then convert local variable list to excel

2020-07-21 19-28-50
Rajat Agrawal
Champion
Solution

Hi @Giselle Chen,

Whatever scenario I have explained above, same things I implemented in the one demo application look at the attached OML.

Below I attached OML for your reference:

Hope this will help you!!


Regards,

Rajat

ExcelDownLoadDemo.oml
UserImage.jpg
Rounak Rawat
Solution

Hii @Giselle Chen 

I’m attaching the .oml file for your reference. You can use it to better understand the implementation or to replicate the solution in your setup.

Best regards,

Rounak Rawat

Thanku

SystemExcel.oml
UserImage.jpg
Giselle Chen

Thank you @Rounak Rawat for guiding me with the other way to achieve the function.

2024-12-02 13-16-47
Vipin Yadav
Solution

Hi @Giselle Chen,

You can export the data using the following query: 

SELECT  {System}.[SystemsName], {System}.[AssigneOfficer], STUFF((SELECT  ', ' + {SubSystems}.[SubsystemName]    FROM {SubSystems}   WHERE  {System}.[Id] = {SubSystems}.[SystemId]  FOR XML PATH ('')), 1, 2, '')  AS SubSystemsNameData FROM  {System}

I have made the changes in the attached OML file. Please check. 

Demo URL - https://vyadav.outsystemscloud.com/ExcelExport/ExcelExport

Thanks,

Vipin Yadav


ExcelExport.oml
UserImage.jpg
Giselle Chen

Thank you @Vipin Yadav for guiding me with the sql way! 


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