Regarding merging tables of different modules.

Regarding merging tables of different modules.

Please do let me know if i could merge a table from one module to another table in another one module for the same application? [ (i.e) I have to combine the 'user' table of my 'Leave Request' module to the 'Manager' table of my 'User Extended' module of my application 'Leave Request Form'. ] . If i could use it by Query then please do explain me how could i do that. Thank You.
I'm going to make the following assumptions:

1) The fields in the two tables are similar or the same
2) Only the data is being merged, not the structure
3) There are no duplicates in the data between the two tables

Here's how I would do this.

1) Create an action with a local variable Manager which is a Manager Entity type
2) Make the User table public (if it isn't already) and reference it in the User Extended eSpace
3) Create an aggregate that selects the user information you want to merge
4) Create a For Each loop using the results from the aggregate
5) Create an assignment that sets all the fields in the Manager variable with data from the aggregate list
6) Call the CreateManager entity action passing the Manager variable
7) Loop back to the For Each

Put a button on some test web screen that calls the action, publish, click the button and your done!

Hope this helps,
Hi Nandhini,

I don't entirely understand your question, but I think Curt's answer is an answer to a different question. Judging your question, I think you just want to join the data of two tables in a query? If so, what exactly can't you do that you would want to do? Joining two tables in an aggregate is very basic, do if the problem lies here, did you follow the training videos? I'm pretty sure it's being discussed there.

The basic steps:
1) In the eSpace you want to query the data, reference the tables that are in other eSpaces (note you need to set them public to be able to do that);
2) Create an aggregate, drag the tables into it from the Data tab. Service Studio will automatically create the joins if it can.

I assumed, based on how I read the question, that Nandhini wanted the data physically residing in a single table, which is what my solution attempts to do.  If he just needs to join the tables for presentation on a web screen (for example) then your solution is better.  If my third assumption is correct then my solution is the only one that will work.


I agree, I just think that given Nandhini's other questions on this forum they've only very recently become an Outsystems developer, and my interpretation is the more likely one :).
   What Cart have understood is exactly what i need. Thank you cart. It works.