using the SAP Function Call builder I get a list with several columns.
With the Data Column Modifier builder I add new columns to this list.
One of these columns should display data from one of the original columns
but without leading zeroes. This works fine using a JLO.
Is there any way to sort this new column?
Putting the new column on "sortable" in the Data Column Modifier has no effect.
Can any added columns be sorted at all?
Any idea would be much appreciated.
This topic has been locked.
3 replies Latest Post - 2013-01-09T18:27:51Z by mburati
Pinned topic How to sort an added column?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-09T18:27:51Z at 2013-01-09T18:27:51Z by mburati
DGawron 10000054HC563 PostsACCEPTED ANSWER
Re: How to sort an added column?2013-01-09T15:46:33Z in response to malik23You cannot sort on columns added by Page Automation because the column doesn't actually exist in the XML data used to populate the page. Sorting is applied to the XML data, not the visual representation of the data you see on a page. If you need to sort on a column that is not present in the data retrieved from a back-end, then you need to modify your service provider operation to add the column(s) as part of the operation's execution. You can use the IXml interface to do this for each row of data obtained from the back-end. Then you'd tweak the service operation's output schema to add a definition(s) for the new column(s). Sorting on those columns will then be possible.
malik23 2700051EQA13 Posts
mburati 060000VQ202367 PostsACCEPTED ANSWER
Re: How to sort an added column?2013-01-09T18:27:51Z in response to malik23As Dave notes, page automation is going to ask that the data be sorted before being rendered, so a new column that just adds additional data at render time isn't that useful for sorting the backend data that doesn't know about that additional render artifact. In fact when I add a column with DCM and ask it to make that Sortable, I get a warning that such an additional generated column cannot be made sortable with that mechanism.
If the column you want to display is just an original data column minus leading zeros then there may be an easier way - formatting the data during render rather than creating a new column to get alternative data.
The out of the box WEF Orders Service Consumer sample (in the building models feature set) has order ids with leading 0s.
- I just added a "Data Field Modifier" to the OrdersServiceConsumer with the following inputs:
- selected the Order Id element on the DSUI uiList page ( uiListuiList/RowSet/Row/ORDER_ID )
- in the "Formatting" section of DFM, I
- selected com.bowstreet.builders.webapp.pageautomation.StandardFormatter from the format class dropdown
- selected "Number Format(FormatString)" from the dropdown
- set Format Exp Arg to #### (4 numeric/pound chars)
- Note the WEF std formatter number formatting uses Java's number formatter class so the same format expressions apply as are doc'd for the java number formatter.
- clicked OK and ran the Orders Service Consumer again and the leading zeros had been removed and the column could still be made sortable (eg, with the DFS that's already in the model). Note, the WEF
Try that with Orders Service Consumer first and then once you get that to work, try the same with your consumer UI model.
I hope that info helps,
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.