How to merge two tables into one

I am trying to learn how to merge and there is an example on the wiki but it is just very complicated I will attempt it again on the weekend as have learned significantly more. I have attached a picture of what I am trying to accomplish. I have two tables table A has unique code for each person and the person will appear only once in that table I have table B that has also that persons code but the name can appear multiple times but can appear only once in a year.

Hopefully someone can assist you would think this would be very common in applications so a guide on this would be very helpful to have a simple and complicated scenario.

Thank you

So you are calling a service to get the first set of data, then calling a service to get the second set of data and you want to display all of the data in one table?

Unfortunately we lack a few features to make this easy (no-code). Your form would have to have 2 tables, one for display and one for temp use.

If this is true, then the basic premise is:

- call the first service and store the results in a temporary table.

- in an onCallFinished handler loop through the tamp table and copy the data into your "display" table. Clear the temp table and call the second service, which will return its data into the temp table.

- in an onCallFinished handler for the second service loop through the table and update the rows of your display table with the values from the second service.

The alternative would be to go full javaScript and make the service calls using dojo, pulling the data into separate variables, merging and then pushing into your one table.

Not exactly that will just create extra rows of duplicate information like the output below following your procedure I am trying to achieve is that second row of employee 1 to merge with first row of employee 1 and employee 2 to have 30 and 65 in the same row. I am surprised that this is not a feature yet to make worthwhile applications you are going to have many cases like this

I am trying the example with merge the two services because that is one that could be something I am after but can't even get that work after hours I wish they updated the files to leap instead of nitro_s that we can try it is probable something so silly. I can't get past this error

TypeError: Cannot read properties of undefined (reading 'title')

var empName = get(app.getSharedData().empsList, app.getSharedData().lastProcessed).title; //3

I usually can figure out this error but don't get this one I tried text instead of title but no luck. I attached the sample file so hopefully you can assist. The title should be in F_PickEmployee.getOptions()

app.getSharedData().empsList = form.getPage('P_NewPage').F_PickEmployee.getOptions(); //1

Link to sample leap app

This is the last bit before my application is ready to be used on daily basis.

Thank you help is greatly appreciated

I posted the answer in the DLeap forum, as it looks like you posted in both places.

I discovered it is not going to work with tables over 1000 entries this is not going to work too slow.