cancel
Showing results for 
Search instead for 
Did you mean: 

Applying custom filter on the device

Former Member
0 Kudos

Hi All,

Working on the CRM Sales Manager app, as per the customer data model we have various types of accounts which we want to show on the device. For one of the account types, we want to download it to the device but not show it on the accounts list by default when the accounts get downloaded. So that would be like applying a user filter on the device by default so that if user wants he can remove that filter and see those particular account types as well.

I know we can control the account types downloaded via the filters on the config panel but we have already configured it to download all account types as that's what we want but would like to restrict it on the device. For that I think we can create a rule as well as per my current understanding so that it filters the list with the account type we do not want to see but I think that would not show as a default filter on the filter icon for the list that the user can go and perform a remove filter when they want to see it.

I've already created a filter on the account type property and that works but user has to go and apply that. What we are looking for is a pre-filtered list on the device which user can remove later.

Requesting you to please suggest if this can be achieved and how. Please let me know if I need to be more clear.

Awaiting your responses.

Thanks & Regards,

Gourav

Tags edited by: Michael Appleby

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

Gourav,

You cannot programmatically apply a default filter using the standard Agentry filter mechanism built into lists.  You can achieve this by adding or modifying the include rule on the list.  Include rules will show all objects for which the rule logic returns true.  Examine some of the existing include rules in your editor to get a feel for how they work.  You can add additional logic to a rule if needed.

You can control the user turning this on/off by adding a new variable to the main object, maybe a Boolean called "DisableFilter".  This will be set to "False" by default.

Add a new Action, Transaction and Button on the screen to toggle this boolean variable, so when the user pushes the button, the "DisableFilter" object property changes from "True" to "False".

Modify the include rule on your list screen or control to look at your "DisableFilter" field and decide whether or not to include certain collection rows based on the boolean setting.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Hi Jason,

Yes we can play with the rules to get that done. But even for the disable filter we would need a user action here which we wanted to avoid. So better I'm providing an account type filter to filter the list of accounts if at all the user has to initiate that.

Thanks for your above response.

Regards,

Gourav

jason_latko
Advisor
Advisor
0 Kudos

Gourav,

You said "What we are looking for is a pre-filtered list on the device which user can remove later."  Maybe I am misunderstanding.  What do you mean that the user can remove later?  The solution I gave you will fiter the list by default without user interaction.  Then if the user wants to remove the filter, they click the new button to toggle the filter off.  This doesn't work for you?

Maybe you mean that you want all the logic on the Java side, away from the client?

Jason Latko - Senior Product Developer at SAP

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi All,

Still awaiting your responses. Thanks in advance.

Regards,

Gourav