Export to Excel - One to Many Relationship
Application Type
Reactive
Service Studio Version
11.11.7 (Build 45559)

I have two tables with One to many relationships, 2nd table contains the identifier of 1st table.


Table as below

I want to combine 2 tables and export them in excel format as below output. We need comments in one cell


I tried using the structure for both tables and combined it with foreach loop, but didn't get the result.


Attaching the OML file for your reference


Regards,

Vinod

Comments.oml

Hi Vinod,

Let me give you one suggestion 

- Create structure of three attributes (Id -->number, ClientName --> Text, Comment -->Text) then create list of this structure as variable (Output list) and variable of type structure (output item)

- Loop for list of comments and add comment to temp text variable with new line between comments

- assign data to variable  (output item) then append this variable to list (Output list)

Please check modifications I did for your module

Commentsmodified.oml

Thanks Mostafa,


It works.


Regards,

Vinod

Hi Vinod,

Made modifications to your module, created a server action to get comments, set as user function. 

Comments.oml

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