cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry: Multi table lookup with Complex Table Drop Downs

Former Member
0 Kudos

Hi everybody

I'm trying to solve the following problem, but my feeling is that it cannot be done in Agentry strictly on the client side. Here's the situation:

One Complex Table Drop Down is based on ctTableA with the following structure:

ctTableA

========

ID

ParentID

Name

PropertyID

Note how there is a hierarchical structure in the table through the ID/ParentID fields.

In the drop down I only display the top level rows, i.e. the rows where ParentID is empty.

So far so good (and no problem to implement).

What I need now, is to display a second Complex Table Drop Down, based on ctTableB with the following structure:

ctTableB

========

PropertyID

Description

And here's the thing: The drop down should display only the properties belonging to the selected row of ctTableA and its child rows through the ID/ParentID hierarchy. Furthermore, each property should only occur once.

This could be solved easily by introducing a third complex table, and populating it on the ABAP side, but adding more overhead to the transmit is not an option.

Any input on how to achieve this, or if it is indeed possible at all?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

-Morten,

You are correct in that as you have outlined it Agentry can't do what you are asking but you do have two options (neither involves a third complex table).

  1. In ctTableB if you include the ParentID you will be able to achieve your objective.
  2. If that is all the data in ctTableB, a better option would be to simply include the Description field in ctTableA and get rid of ctTableB altogether.  This is more the classic cascade parent setup.

Either of these two options will give you the ability to do what you described.

--Bill

Former Member
0 Kudos

Hi Bill

Thanks for your response.

a) is not an option, unfortunately, since a single ctTableA ID can have several PropertyIDs and vice versa.

b) we actually did consider. If I added the property Description field to ctTableA, I would be able to use ctTableA as the source for the second drop down. However, I would still need to do the filtering (only show the properties of the selected ctTableA row and all its child rows) and also remove any duplicate properties. I'm fairly new to Agentry, but as of right now, I can't see a way to do that.

Thanks again,

Morten

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Morten,

Agentry will handle the filtering for you.  The Complex table drop down control will automatically filter and remove duplicate entries showing only the Parent Names in the first drop down.  Then when you select the parent in the first drop down you have a second complex table drop down that has the cascade parent value set to the selected value from the first drop down.  This then causes only those property id values belonging to the selected parent to be displayed. 

I would recommend going with option b.

--Bill

Former Member
0 Kudos

Hi Bill

Thanks again for your input on this. I ended up adding both the Description and a new AncestorID field to ctTableA. That way I can select an ancestor from a drop down based on ctTableA, and then select a property from a second drop down, also based on ctTableA. The second drop down uses the selected value of the first drop down to filter its displayed values.

It's still not completely working, though. It is, by any chance, a problem to have two Complex Table Drop Downs based on the same complex table, with a cascade parent relationship between them?

Thanks,

Morten

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Morten,

There is no issue with running two complex table drop downs off the same table.  That is frequently the scenario where it is used with cascading parents.

What does your table look like now?  I am having a little trouble following the structure.

--Bill

Answers (0)