on 04-17-2014 1:21 AM
Hello Experts,
I am trying to filter a displayed list at run time ( while running the application). the list fetches the data from an existing object.
I am trying to customize few things while displaying the filters on the list.
So far, I could only find a single property under Agentry application configuration to deal with filtering list values, as per the screenshot below.
Moreover, I could see that I can allow filtering the list based on a set of particular fields.
Here, I cannot determine if the Agentry Editor will allow me to customize the look and feel of the filters being displayed.
Is there any other way I can filter the lists and which provides me with the flexibility to customize the look and feel of the filters being displayed?
For example, i could add an image in the list and might want to filter the list based on a particular image. will this be possible and supported by SAP Work Manager 5.3 (Agentry 6.0) ?
Arihant,
You cannot customize the standard built in filter that you discovered with the filter check box and filter columns. You could build an artificial filter yourself tied to screen buttons and actions you have created, all driven by an include rule on the list itself. Include rules allow you to add logic to decide which rows are displayed on the list. Include rules run once for each row in the list and evaluate the logic as a boolean. If the rule returns "True", the row will be displayed in the list, otherwise it will not.
You could add an action button to your screen that when pressed displays a transaction screen with multiple images and radio buttons next to each one. The user could select a radio button and you would write the selection to a main object variable TempImage. Then your include rule on the list would look like this:
IF
NOT
EQSTR
Main Object -> TempImage Property
EmptyConstant
EQSTR
Main Object -> TempImage Property
MyObject -> ImageName Property
True
The above rule says: If TempImage in the Main Object is not blank, for each MyObject in the list collection, the ImageName property must be equal to the TempImage property in the Main Object. If TempImage is blank, then show all rows.
You could then add another button that runs another transaction to blank out TempImage to disable the custom filter.
Jaosn Latko - Senior Product Developer at SAP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Jason and Sravanthi for your helpful replies.
I encountered an issue while enabling sort functionality on a particular list.
I enabled the sort functionality as per the screenshot below.
I can see that the windows application has the sort icon present on the header of the list.
On the iPad application, sort button doesn't appear. only filter button appears there.
Can we do something for this?
Hi,
It is better to develop screens specific to the platform in the sense if you are deploying the application to windows,then add a screen to the windows platform,if for ipad add screen to ipad platform.Deploying the application in which screen are developed for windows in to ipad will work,since agentry is platform independent,the server will pick the screenset from screensets.ini file but all the features may not be supported.Try once developing screens with ipad platform and then deploy .Make sure you have added list view sort properties.
Now check in ATE after that deploy in mobile ,let me know in case it is working or not.
Regards,
Sravanthi
Hi Arihant,
I tried this filter and sort list tile in ATE. Please refer my example regarding the filtering and sorting:
Step1: No Filter.
Here there is no filter, so ATE is not hvaing any filtering.
Step2: Add filtering property to the List Tile.
Filtering properties:
Test in ATE.
Click on that filter symbol, we will get the following.
Step3: Add Sorting to the List Tile.
Sort Properties are: Add the CompanyName as sort property
Check in ATE.
Apply sort by clicking the symbol
List rows are sorted based on company name as below:
I to checked in iphone but the sort property is not coming. I will check the gaps and update.
Thanks,
Swaroopa.
Dear Jason / Bill , As you said , Sort property is not working for iPad client . But is there any way around i can enable sort runtime in iPad . Because my customer has requirement they want to sort data on run time based on Order , Priority and start date . Can you please provide some suggestion on it ? Thanks & Reagdrs, Kunal Varaiya
Hi Kunal,
no there is no workaround for sorting. But there is a way to filter during runtime by priority e.g. But this is a kind of a static approach, that means you have for each filter criteria a button and at least one that resets the list. By implementing buttons that sets a specific value via a backround transaction and initial value rules. After that you have to implement a include rule that validates these flags for the collection objects. Based on that the collection will be filtered by these parameters. In fact you have to build a logic that sets flags in the objects to achieve that.
The user then has the possibility to push a button and gets the list filterd by the underlaying logic.
In short words. You have a button for Prio High, Medium and Low. The mechanism behind the buttons sets a flag or several flags. With the include rule you validate these flags and the result will be the condensed list. Ok it is not sorting but filtering regarding specific requirements and the user sees only the result based on the criteria he was choosen, like a specific priority.
Kind regards,
Mike
Hello Michael , Thank you so much... I got bit surprised because sorting is working in windows client or ATE but not working iPad client . i am also not sure how can i enable this functionality in iPad client at the same time its necessary for me to implement for my customer . can you provide some suggestion for sorting ? Thanks & Regards, Kunal Varaiya
Hi Kunal,
I implemented sorting already on iPad. You do the following:
- create a new property Z_Sort in your object and set the Tile List to be sorted for this property.
- create a button(s) which calls an action and loops over the collection --> and set the sort property by using a transaction for each object
- if the button e.g. is "sort by WoNum" call the your transaction, which copies the WoNum into the Z_Sort property of you object.
Regards,
Michel
Dear Michel , Thank you so much for your replay ... Just wanted to ask , it means i have to create 3 buttons because want to sort 3 ways . Ex : 1) WO no 2) Start Date 3) Priority or will it handle by only one button ? can you please give more suggestion ? and if you are writing any rule for it ? then can you provide some structure for it . if its possible can you share some screen shot for more understanding . Thanks & Regards , Kunal Varaiya
Hi Kunal,
it's right that you have to create three button (actions) for each sort property. You can group the actions in a toolbar menu as shown in my picture.
The only thing you have to do is to update the Z_Sort property in your collection with the choosen sort property. To update all properties create a looping action and then create a transaction for each sort property, which copy the sort property to the Z_Sort field.
Regards,
Michel
Kunal,
As was indicated earlier in this thread, runtime sorting via the editor settings is not supported on iOS at this time. Michael has provided a great suggestion for a workaround using a custom property for sorting. That is something you can look at implanting.
Since the ATE is a Windows based environment it displays the sorting options for you even though you have selected the iPad for the screen sets. With the newer clients the ATE should be used primarily for validating data downloads, CT/DT contents and some transaction debugging. You should use the actual device for the bulk of your testing.
Also since this thread is already marked answered you should really open a new thread so it can be tracked and answered accordingly.
--Bill
Hi,
I think the screen to filter cannot be modified since it is a in build screen.In SMP 3.0 where it integrated both SUP and Agentry, Open UI concept is used to override the details screen field edit type with custom controls specific for different platforms like ios ,windows and android(where native code for specific platform is used to override the fields).
Regards,
Sravanthi Polu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.