Custom sorting for a Table column
I have a Table object with multiple columns. The first is an alphanumeric unique identifier that is usually utilized by clients as String representations of integers. When a client does use integers, the sorting is completely off. Here is a sample list of how Studio Creator sorts this data:
1
10
11
12
2
3
4
5
6
7
8
9I obviously would like 10, 11, and 12 to come after 9. One way I could do this is to sort the values after they have been left-padded with zeros; however, I don't know how to implement this. I created a small class that implements Comparator in a way that will left-pad all Strings up to a max of 25 characters long, and then sorts them.
How can I have Studio Creator sort like I want it to? Thanks.
Solved.
I continued down the path of the object that implements Comparator and left-pads all values with zeros up to a total length of 25; I also sorted alphanumeric characters after numeric characters. I overwrote .compare(), .equals(), and .toString(). The issue was that I had to create a custom Converter for the TextField to be able to write updates to it.
Similar Messages
-
Webi 4.0 Custom Sort for SSAS Hierarchy
Hi,
I'm using SSAS cube as a source for my webi report .Some report need custom sorting for hierarchy object , we are not able to apply sorting correctly in webi.
What do i need to do in order to apply the custom sorting for hierarchy object? Thanks.Hi, I've written a post on this:
http://blog.davidg.com.au/2011/09/dynamic-measures-in-webi-on-any-data.html
...and a few people in the comments seemed to have the same problem as you, which seems to be a bug (clicking the ellipsis does not launch the custom values screen).
Perhaps you could try the solution offered by Gallin, which was to create a second input control, then retry the steps to create another input control and click the ellipsis to enter custom values.
Hope that helps. -
Re: Custom Filter for a table
Can someone point me to a tutorial for overriding the FilterableQueryDescriptor to build custom filter for a table?
In the example you provided, the querylistener is invoked only when the user types in the filter field of the table. How do I invoke the querylistener without the user typing in the filter field? For example, an automatic filter without the user typing in the filter field of the table. In other words, a pre-filled filter field. When the table loads at run time the filter field is already filled with the letters "Sa" without user intervention.
Edited by: John on Dec 28, 2011 10:24 PM
Edited by: John on Dec 28, 2011 10:51 PM -
Hi how to apply Chronological sort for a month column?
Hi All,
I am struck with how to apply Chronological sort for a month column that contains values like January, February, March, April, May, June.... December. If we apply normal sorting then we can arrange the column values either in ascending order or descending order. But i want the column values to be in this format like jan, feb, mar,apr....dec. Is it possible???
If this is possible then pls tell me the way in a step wise manner for my better understanding..
Thanks in Advance
ThenmozhiHi Deva,
I tried with the below formula :
CASE WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='January' THEN 1 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='February' THEN 2 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='March' THEN 3 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='April' THEN 4 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='May' THEN 5 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='June' THEN 6 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='July' THEN 7 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='August' THEN 8 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='September' THEN 9 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='October' THEN 10 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='November' THEN 11 WHEN
"Order Booked Date Calendar"."Full Month Name (Order Booked)"='December' THEN 12 ELSE '' END
But it is showing the error like this:
Error Details
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 17001] Oracle Error code: 604, message: ORA-00604: error occurred at recursive SQL level 1 ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 8 ORA-00932: inconsistent datatypes: expected NUMBER got CHAR at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
What it is problem? Please help me...
Thanks -
Hi All,
I want to disable the sorting function for my table. How can I achieve this? Please help...!!!
-spsIf you are using a JTable, by default row sorting is unable. Infact, to provide you the Table sorting, you have to put the line
JTable table = new JTable (...);
table.setAutoCreateSorter (true) //this enableinto your code or writing a RowSorter.
Otherwise there's no sorter for the Table and you can't do any kind of sorting.
Regards,
Maurizio -
Using Alias for the table column
Dear all,
Can we use alias name for the table column while developing zreport.
ie.,
without using standard table column name ( like mara-matnr ), i wish to use mat_num for matnr. So that, one can easily understand the column.
Could you help me out in this regard.
Thanks in Advance,
S.Sridhar.yes you can declare in ur internal table like
material_number like mara-matnr. -
Custom fields for FV50 table control
Hello,
The customer has a requirement to add 3 text fields to the table control in Transaction FV50. These fields are currently not available in the table control at all (I checked the Table settings Administrator). Further, no Screen/Transaction Variant has been implemented either to prevent these fields from being displayed. Which is why I'd like to find a way to add these custom fields to this table control. These fields are the text descrptions for the numeric fields Cost Center, Fund and Business Area.
I've read many posts on this forum regarding potential solutions including the link below which details the SAP std solution. Only problem is this approach adds these fields to the data dictionary tables underlying the screen. The customer says about 1 million records are being generated a month so they would rather not have all that extra data at the line item level.
Custom column for FB60
If anybody has done this sort of thing via a user exit I'd much appreciate your input.
Thanks,
TarunHi Rob,
Yes, I checked IMG configuration and found that Txn OXK3 allows us to extend the underlying tables and customize the generic fields in the table control. However, the client has nearly 1 million postings to table BSEG each month and I'm guessing this approach will entail adding the custom fields to table BSEG, which won't work for them. I haven't actually tried this approach because the SAP documentation has some dire warnings about proceeding. But if you have any insight as to whether this can be achieved without extending BSEG (possibly just extend VBSEGS??) that would be very valuable.
Thanks,
Tarun -
Trigger how to get new and old value for nested table column?
Hi,
I have created a nested table based on the following details:
CREATE TYPE typ_item AS OBJECT --create object
(prodid NUMBER(5),
price NUMBER(7,2) )
CREATE TYPE typ_item_nst -- define nested table type
AS TABLE OF typ_item
CREATE TABLE pOrder ( -- create database table
ordid NUMBER(5),
supplier NUMBER(5),
requester NUMBER(4),
ordered DATE,
items typ_item_nst)
NESTED TABLE items STORE AS item_stor_tab
INSERT INTO pOrder
VALUES (800, 80, 8000, sysdate,
typ_item_nst (typ_item (88, 888)));
Now I would like to create a trigger on table pOrder for after insert or update or delete
and I would like to track the new and old value for the columns inside nested table.
Can anybody direct me how to do it?
I would like to know the sytax for it like:
declare
x number;
begin
x := :new.nestedtablecolumn;--how to get the new and old value from nested table columns
end;
Hope my question is clear.
Thanks,
LavanHi,
Try like this:
CREATE OR REPLACE TRIGGER PORDER_I
BEFORE INSERT
ON PORDER
REFERENCING OLD AS old NEW AS new
FOR EACH ROW
DECLARE
items_new typ_item_nst;
ordid_NEW NUMBER;
BEGIN
FOR i IN :new.items.FIRST .. :new.items.LAST LOOP -- For first to last element
DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').prodid: ' || :new.items(I).prodid );
DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').price: ' || :new.items(I).price );
END LOOP;
END;Regards,
Peter -
CC&B 2.3.1 - Custom indexes for base tables
Hi,
We are seeing a couple of statements in the database that could improve its performance with new custom indexes on base tables. Questions are:
- can we create new indexes on base tables ?
- is there any recommendations about naming, characteristics and location for this indexes ?
- is there any additional step to do in CC&B in order to use the index (define metadata or ...) ?
Thanks.
Regards.Hi,
if it necessary You can crate custom index.
In this situation You should follow naming convention from Database Design Standards:
Indexes
Index names are composed of the following parts:
+[X][C/M/T]NNN[P/S]+
+• X – letter X is used as a leading character of all base index names prior to Version 2.0.0. Now the first character of product owner flag value should be used instead of letter X. For client specific implementation index in Oracle, use CM.+
+• C/M/T – The second character can be either C or M or T. C is used for control tables (Admin tables). M is for the master tables. T is reserved for the transaction tables.+
+• NNN – A three-digit number that uniquely identifies the table on which the index is defined.+
+• P/S/C – P indicates that this index is the primary key index. S is used for indexes other than primary keys. Use C to indicate a client specific implementation index in DB2 implementation.+
Some examples are:
+• XC001P0+
+• XT206S1+
+• XT206C2+
+• CM206S2+
Warning! Do not use index names in the application as the names can change due to unforeseeable reasons
There is no additional metadata information for indexes in CI_MD* tables - because change of indexes does not influence generated Java code.
Hope that helps.
Regards,
Bartlomiej -
Customized scrollbar for af:table,af:panelgroup & af:panelbox
Hi All,
Im using Jdev 11.1.15 version. My requirement is to customize the scroll bars in Table,PanelGroup & Panelbox. like replacing the background of the scroll with custom image and the scroll bar with custom scroll bar image.
Any inputs on this much appreciated.
Thanks in Advance.
Kris.Hi Kris,
I am able to change the scroll bar colors with below code for document and dialog components. Expecting ADF allows below code can be applied for af:table, af:panelgroup & af:panelbox components.
af|document{
scrollbar-arrow-color: #000000;
scrollbar-3dlight-color: #CCCCCC;
scrollbar-darkshadow-color: #999999;
scrollbar-face-color: #D4D0C8;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #CCCCCC;
scrollbar-track-color: #404040;
af|dialog{
scrollbar-arrow-color: #000000;
scrollbar-3dlight-color: #CCCCCC;
scrollbar-darkshadow-color: #999999;
scrollbar-face-color: #D4D0C8;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #CCCCCC;
scrollbar-track-color: #404040;
Thank you.
Regards,
Mogilicherla Suman Kumar -
BIG CONCERN for data table columns bound to property.
Here the issue.
I have a data table with many columns of which:
1/ first group bound directly to database table columns.
2/ Second group bound indirectly to database table columns through properties (I need some extra formatting depends on the data of the database table�s columns).
When I display the page the first time it appears correct but when I go back to the page previously displayed the second group columns all get the last value of the bound properties.
What I guess is:
- The first group of columns get data from database.
- The second group of columns just get the value of the properties they were bound , the getXXXXXX method does not get called again because the page was already loaded ?�..So my second group displayed with the wrong data (the last value of property they were bound to).
BIG ISSUE�.when I redisplay the previous page. For example I am on page 3 when I go back to page 1 or page 2 they display the wrong data�
Is it the way it supposed to work ? If so how to force the getXXXXXX method called again to get the right property�s value not the last property�s value?
Thanks.Here is what I am trying to do (this is a real application not with Pointbase bundled with jCreator).
I want to display a iSeries (AS/400) table in a data table but some columns I need to format suitably:
For example: I have a few date columns in my database table are numeric fields not date fields so if its value is zero I don�t need to display. What I do to display in data table is:
1/ To bind its value to a property let�s call it enteredDate of type java.sql.date
public Date getEnteredDate() {
Object o = getValue("#{dealDetaiSWAPl.dealRowSet1.currentRow['$SEND']}");
return getMyDateFromDdMmYy(o); this method is to convert $SEND from numeric to Date field.
2/ To bind rendered attribute to enteredDateRendered
public boolean isEnteredDateRendered() {
Object o = getValue("#{dealDetaiSWAPl.dealRowSet1.currentRow['$SEND']}");
return dateRendered(o);
public boolean isDateRendered(Object o) { /* This method I reuse elsewhere */
int date = java.lang.Integer.parseInt(o.toString());
if (date == 0)
return false;
else
return true;
When I display page 1 : it looks correct.
Ex: ��date1�..
��date2�..
��date3�..
Display page 2: it looks correct.
Ex: ��date4�..
��date5�..
��date6�..
Go back to page 1: all columns date have the same value of the first row
Ex: ��date1�..
��date1�..
��date1�..
I did not change anything in page navigation method.
By the way I notice that each time I go to table layout screen JSC deletes all components I added in the navigation gridPanel. So if I change something in them I have to restart the whole thing again.
Can you give me your email I will send you screenshots of my application.
Thanks. -
Custom Sort for nodes in a hierarchy
Hi All,
I would like to know how to sort nodes according to a specific order in a hierarchy. I know at the hierarchy level you can set the StandardHierSort property to a custom property i.e CustSortOrder.
But for the custom property CustSortOrder, how do i set it up so the nodes in the hierarchy will be sorted according to the custom list?
Thanks
RThis is right out of the MDM_User_guide (Look under Custom Sort Order)
Custom Sort Order
Nodes can also be sorted in any explicit custom sort order (although limbs are always sorted
ahead of leaves.) The sort order can be defined by any property that has a property data type of
SortOrder. (The SortOrder data type is special case of an Integer data type.) By default, any
Hyperion MDM installation includes a property called Sort Order (assigned to the Default
property category) that can be used for this purpose.
To sort a hierarchy according to the value of a node-level sort order property, the hierarchylevel
property StandardHierSort must have its value set to point to the appropriate node-level
property that contains the sort order.
A custom sort order can also be used that applies only to a specific Hyperion MDM user ID,
enabling users to customize their display of Hyperion MDM data without impacting other users
of the same hierarchy. This is controlled by the hierarchy-level property UserHierSort. If this
property has been set to point to a node-level property that has a data type of Sort Order, then
this sort order takes precedence over both the StandardHierSort property and the default sort
order.
If there is no value assigned to the hierarchy-level property StandardHierSort nor to
UserHierSort, then the default sort order is applied.
The value of a custom sort order property can be set in any of the following ways:
1.Sort order values can be loaded into a node-level sort order property when data is initially
imported into Hyperion MDM (see following for details.)
2. Explicit values can be defined for the sort order property for any node.
If a sort order property has been selected for a hierarchy’s StandardHierSort or UserHierSort
properties, then the Order Children menu option is available by right-clicking on any node
in a hierarchy. This opens a dialog box that enables the sort order of limbs and leaves to be
set graphically.
3. A node-level sort order property might be defined as Derived, and so might be automatically
populated with a sort order. -
Sum function for internal table column
Dear Experts,
how can I sum a complete internal table column.
Regards
ertasHi,
Use SUM in AT END of event in the loop of an internal table.
Example
Loop at ITAB into wa_itab.
at end of wa_itab-field.
sum. " Here all numric fields will be summed and stored in that filed(wa_itab-field)
endat.
Endloop.
Regards
Krishna -
Does DPL support custom sorter for key?
Hi all,Is there any approach to implement my own sorter for key?
I know that this is supported with Basic API,but I failed to find the document about this.
Thanks in advance.Hi,
See the Key Sort Order section on this page:
http://docs.oracle.com/cd/E17277_02/html/java/com/sleepycat/persist/model/PrimaryKey.html
--mark -
ADF 11g How to create the custom FilterableQueryDescriptor for adf table
Can you please let me know on the following.
1. I am dispalying the adf table using a List from the managed bean
2. I wanted to filter the table using the filter model.
3. i wanted to create the sub class of FilterableQueryDescriptor which i can specify. Not finding enough information on how to create and add the information in the setFilterCriteria
Can you please provide some insight into this topciHello there
I have the same issue: chaging the background color of some column headers.
My application is using a custom skinning and when i had headerClass property with a custom class defined in a separate css file, the page generated specified first the class from the skinning and then my new class definition. But my skinning is specifying a background color so the color is not overriden. Any idea?
ADF code:
<link type="text/css" rel="stylesheet" href="../../css/pivot.css" id="myStyles"/>
<af:column headerText="#{level1.userObject.name}"
headerClass="inputHeader"
sortable="false" align="center" width="100"
id="col_level1" >
Generate HTML code:
<th align="center" class="xuh inputHeader" afrroot="true" rowspan="2" afrleaf="true" dindex="6" id="pt1:tableId:col_level1" style="">
<div class="x13t">AEKLF</div>
</th>
My CSS file:
.inputHeader{
background-color: Red;
background-image: none;
color: Black;
font-weight: bold;
Thanks for your help !
Maybe you are looking for
-
Apparent bug in 3.1's handling of color labels
This ties is with [Applescipt manipulating color label|http://discussions.apple.com/thread.jspa?threadID=2645193&tstart=15] posted earlier today. If you set the color label of an image to have no color label via the pulldown in the metadata tab of th
-
Can I get the notebook replaced / screen replaced if i have a single dead pixel?
Hi,I have a 2 days old notebook, and there's a stuck pixel (red) on the display.It's an expensive notebook, costs more than a thousand dollars, and HP website tells me I cannot get it fixed or replaced if i have just a single bad pixel.I'm HATING my
-
My G4 froze last saturday and after a forced shut down, the fans would start spinning really fast and nothing else would happen. After reading some of the threads on that subject, I did a deep PMU reset, didn't work the first but worked once I booted
-
When is 9.0.4 released
Is there an update on the release date for Jdev 9.0.4 ?
-
Safari crash cant able to make it
Process: Safari [617] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safari Version: 5.1 (7534.48.3) Build Info: WebBrowser-7534048003000000~1 Code Type: X86-64 (Native) Parent Pr