cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry development - filtering on child object collection

Former Member
0 Kudos

Hi experts,

I have a question if there is a way in Agentry to configure a filter in the following hypothetical scenario:

1. Detail screen for a certain customer segment with a List Tile View showing a list of customers in this segment

2. If you click on a customer, you open a detail screen for this customer, with a List Tile View of its orders. The orders have a property - Low or High

3. If you click on an order, you have a List Tile View with the products A, B, C, etc.

Can we put a filter on the first screen (with the list of customers) - that filters only customers that currently have orders with priority High... and when the filter is active and the customer is clicked and displayed - the List Tile View in the second screen will display only the order with High priority in the List Tile View.

Not sure if the explanation is clear .. hope someone will figure it out!

Regards,

Denis

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

Denis,

Sure you can do all of this with include rules on the List Tile View control.  An include rule is a programmable filter you can set with rule logic.  Include rules will run once for each row in the collection, and will only display rows on the tile that return true when the rule is run against that row.  On the customer List Tile View, add an include rule that says:

     EQSTR

          Customer Object -> Priority Property

          "HIGH"

This will filter the list to show only HIGH priority customers.

You can also reference the selected row in subsequent include rules to make logic choices based on what was selected previously:

     EQSTR

          Customer Object -> Priority Property

          Some Screenset -> Some Screen -> List Tile Control -> Selected Object -> Priority Property

The above will only dipslay customers that have a priority matching the selected object's priority on some other screen's List Tile control.

Does this work for you?

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Hi Jason,

Thanks for the prompt response!

I see that this include rule setting is done in the "List Tile View Data / Styles" definitions. As far as I understand, this rule (filter) will be permanent? I'm looking for an option where the user can choose whether to apply the filter or not - something like the standard filter on a list screen. Pls, correct if I'm wrong or not getting the idea

Cheers

Denis

jason_latko
Advisor
Advisor
0 Kudos

Denis,

You are correct in that the rule is permanent, but you can write include rules in such a way that you can still control whether they are active or not.

You will create an artifical filter that the user can control: Add a menu or toolbar button or push button to the detail screen that displays the List Tile you want to have this sometimes filter.  Add a filter image or text "Filter On/Off" or dynamic text that says "Filter On" or "Filter Off" depending on a variable setting.

Tie an action to this button that runs a transaction and toggles a new Main Object variable called FilterActive.  This variable is a Boolean and is either True or False.  This should toggle as the user clicks the button.

Back in the Include Rule on the List Tile, check your toggle variable to decide if you want to run your include logic, or if you want to disable the logic and display all rows in the collection:

IF

     MainObject -> FilterActive property

EQSTR

     Customer Object -> Priority Property

     "HIGH"

True

The above rule says: If the FilterActive property is True, then only show the HIGH priority rows, otherwise, show everything.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Hi Jason,

This should work.

Many thanks again for your help here! You're an invaluable member of this community!

Cheers

Denis

jason_latko
Advisor
Advisor
0 Kudos

Denis,

No problem.  Thanks for the kind words.

Jason Latko - Senior Product Developer at SAP

Answers (0)