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.
DGawron 10000054HC580 Posts
Re: How to sort an added column?2013-01-09T15:46:33ZThis is the accepted answer. This is the accepted answer.You 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
Re: How to sort an added column?2013-01-09T16:09:57ZThis is the accepted answer. This is the accepted answer.
- DGawron 10000054HC
I haven't worked with the IXml interface before but if it is the only
way do do this kind of sorting I will have a look at it.
mburati 060000VQ202575 Posts
Re: How to sort an added column?2013-01-09T18:27:51ZThis is the accepted answer. This is the accepted answer.
- malik23 2700051EQA
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.