cancel
Showing results for 
Search instead for 
Did you mean: 

Putting outputs from 2 different sources in one table

Former Member
0 Kudos

Hi SAP guys,

Another question for you guru's..

I am having 2 BI_SOURCES, one for tasks and the other one deals with 'principal assignments'. So we can find the actual/potential owner.

In the task source there is an entry field 'ID-DISPLAY KEY'which equals the REFERENCE-ID-DISPLAY KEYin the other source. With that 'REFERENCE-ID-DISPLAY_KEY' I am able to get the actual/potential owners where I filter to only get the actual owner.

However, now this happens via copying data from the task table into a 'form' and that then results in a table where the actual owner is displayed. (see screenshots).

What I would like to achieve is that the actual owner is displayed in the same table as the the tasks. However, I have tried via union but did not succeed to make the correct combination. In that way I would also avoid having the filter + an extra column which makes it lighter and easier for the users in the future to spot the actual owner.

Thanks in advance,

Jan

Accepted Solutions (1)

Accepted Solutions (1)

former_member202465
Contributor
0 Kudos

Hi Jan,

I'd like to suggest an alternative solution in modeling for this. If I get this right, you have this result now:

and you want to get the names instead of IDs like this for example:

If you have a second service returning the list of users (name and ID) then it's possible using an Entry List:

  1. In the layout board, change the control to Dropdown list (right click => change control type).
  2. Define the Entry List on the control (right click => Entry List) to use the 2nd service, such that in the output section the Value is the ID and the Text is the Name:

    

If you don't wish to enable changing of the user in this table you could set the control to Read-only in the Configure Panel.

I hope this solution is valid for your case. Anyway, the solid and more general solution is what Anja suggested - have an SQL Join operation on the database level, to get all required fields. Then consume this new function in Visual Composer.

Thanks,

Udi

Former Member
0 Kudos

Hi Udi,

I appreciate your input and effort but I am afraid this does not solve the issue for me.

For the moment I have the TASK ID which is the REFERENCE ID in another data source.

Then in that other data source there is also an field called ROLE_TYPE which gives me the different roles (potential owner, actual owner, etc.) and also a output field called PRINCIPAL_NAME which returns the USER ID.

What I want to retrieve in the table is the PRINCIPAL_NAME(user id) for the actual owner of a task.

Eg.

TASK ID: XYZ

REFERENCE ID: XYZ

ROLE_TYPE: POTENTIAL OWNER                 PRINCIPIAL NAME (user id): BE90466

                     POTENTIAL OWNER                 PRINCIPIAL NAME (user id): BE92692

                     POTENTIAL OWNER                 PRINCIPIAL NAME (user id): BE96483

                     ....

                     ACTUAL OWNER                     PRINCIPIAL NAME (user id): BE90466

Thanks,

Jan

former_member202465
Contributor
0 Kudos

Hi Jan, thanks for the reply.

I think I get it: in the 2nd table there are several entries for each task. I have two answers:

1. It seems possible to improve the current application if getting the actual owner is automated.

2. The Entry List solution is made more complex, but I think also possible - I will explain later in a separate post.

For the 1st point, it seems like a kind of "Muster-Slave" scenario: we get data from the 1st souce. then according to the user selected record we get data from the 2nd source. In the UI it might look like this:

According to your current application I believe you have some kind of service returning the Actual Owner by task id. You could connect from the Tasks table directly to that service, while the flow is activated by the "select" event of the table (the Event Name on the link). In the Data Map of this link you pass the Task Id:

About the presentation of the Actual Owner, it could be done in a Table like here, or in a Form, and you could also place it below the Tasks tabel or to the side (using Panels).

I hope this helps,

Thanks,

Udi

Former Member
0 Kudos

Hi Udi,

This certainly helps.

The funny thing is that I actually implemented your solution 1 but just added an extra form view to it which caused that I had to enter the task id manually each time. So now I deleted it and it gives me already a more user-comfortable view.

Thanks for that!

Kr,

Jan

former_member202465
Contributor
0 Kudos

Hi Jan,

I'd like to explain the 2nd solution for this - through Entry List.

First let's see the data layout through tables - though we might need only the first table in the application. The Tasks table may look like this:

The Task Details table includes several entries for each task, while the "reference" field is the task id:

We want to be able to get the entries of Actual Owners only, like this:

For this we need a new Service Component, to return the filtered results.

1. Create a new model of this type:

2. Define the flow of the model this way:

Add the Task Details service to the model - here seen as a Service Component but in your case it's a Data Service using a real backend.

From the output of the Task Details service connect a Filter and define the condition to return only Actual Owners.

from the Filter connect a Data Out element. An Empty Data In is required only to activate the Service.

3. On the ID control of the Tasks table right click => change control type => Dropdown list.

4. Create an Entry List (right click => Entry List) for this control using the new Service Component from step 2.

In the Select Data Service step search for Visual Composer components to find your service component:

In the ouput step define the Value and Text as follows:

Now there is an enumeration on this control where the Value is the Task Id and the Text is the Actual Owner name.

5. Set the title of the control to Actual Owner, and its Read Only property to true.

The run-time result may look like this:

As said before, this is a modeling workaround, while the clean way is using a Data Service that performs the required SQL Join operation.

I hope this helps,

Thanks,

Udi

Former Member
0 Kudos

Hi Udi,

Thanks for the explanation.

I tried implementing it but it seems that when I deploy my model and try to run it, it just keeps loading without presenting me with a visibile model.

So I created a new service component

Then in the TASK TABLE I created my Entry List. I was just wondering, don't I have to put something in the input fields?

I defined the ID column as 'Actual Owner' and made it 'Read Only'.

I do not know it you maybe see something I did wrong?

Thanks again!

Jan

former_member202465
Contributor
0 Kudos

Hi Jan,

This all looks OK to me. About the Inputs part: in out case the Service Component used in the Entry List has no fields in the Input Port, so there is no mapping needs to be done.

What exactly happens when you run the main model (with the table)? Could you add a screenshot (if you think it's relevant in this case)?

Working in steps:

You could also use the new Service Component in a model and connect a table to its output, just to see it works as expected in run-time (like in my example - I show the runtime results of it - just above step #1). This way you eliminate possible candidates as responsible for the error.

Thanks,

Udi

Former Member
0 Kudos

Hi Udi,

I just checked again to respond to your question and for some reason it suddenly works although I did not change anything. Previously I got 2-3 time outs due to loading the model.

So now it works, thanks!

former_member202465
Contributor
0 Kudos

Hi Jan,

I'm don't know whether it's the reason, but we must remember that we define an Entry List that calls the backend for each row, so we might at least expect performance issues )-:

Thanks,

Udi

Former Member
0 Kudos

Hi Udi,

Thanks for your answer.

That might indeed be the case, so it might be better for us in the case to stick to solution 1 because I can imagine that someone with little knowledge opens the model and if it doesn't load, that he just assumes that the model doesn't work.

Thanks anyway for the good help!

Answers (1)

Answers (1)

anja_engelhardt2
Active Contributor
0 Kudos

Hi Jan,

Sorry, I didn't find the time to answer again in the other thread. What you are looking for is a join. Visual Composer doesn't provide any standard functionality for join. Maybe you can try to do this on BI side?

Best regards,

Anja

Former Member
0 Kudos

Hi Anja,

No problem.

Thanks for the answer here.

I am not sure on how I should change a BI source but I'll check with the teams here. MAybe someone on their side knows something about it.

Thanks,

Jan

anja_engelhardt2
Active Contributor
0 Kudos

Good luck. I don't know either. My knowledge about BI is quite limited.

Anja