Home » Developer & Programmer » Forms » Sort On Non-Database Column (Forms 10g ver 10.1.2.3.0)
Sort On Non-Database Column [message #490661] Wed, 26 January 2011 08:08 Go to next message
Kevin58
Messages: 79
Registered: January 2009
Member
I have a master detail form that presents a list of 22 items
that can be checked or unchecked depending on whether the test is
needed.

The issue I have is trying to order or sequence the list in a specific order without a database column.

Here is the code I am trying to use in a post query trigger:

CASE :SAMPLE_TESTS.TESTCODE
    when 'L001'
      then :SAMPLE_TESTS.SEQ := '02' || :SAMPLE_TESTS.TESTCODE;
    when 'L002'
      then :SAMPLE_TESTS.SEQ := '03' || :SAMPLE_TESTS.TESTCODE;
    when 'L003'
      then :SAMPLE_TESTS.SEQ := '04' || :SAMPLE_TESTS.TESTCODE;
    when 'L004'
      then :SAMPLE_TESTS.SEQ := '06' || :SAMPLE_TESTS.TESTCODE;
    when 'L005'
      then :SAMPLE_TESTS.SEQ := '07' || :SAMPLE_TESTS.TESTCODE;
    when 'L006'
      then :SAMPLE_TESTS.SEQ := '08' || :SAMPLE_TESTS.TESTCODE;
    when 'L007'
      then :SAMPLE_TESTS.SEQ := '09' || :SAMPLE_TESTS.TESTCODE;
    when 'L008'
      then :SAMPLE_TESTS.SEQ := '10' || :SAMPLE_TESTS.TESTCODE;
    when 'L009'
      then :SAMPLE_TESTS.SEQ := '11' || :SAMPLE_TESTS.TESTCODE;
    when 'L010'
      then :SAMPLE_TESTS.SEQ := '12' || :SAMPLE_TESTS.TESTCODE;
    when 'L011'
      then :SAMPLE_TESTS.SEQ := '15' || :SAMPLE_TESTS.TESTCODE;
    when 'L012'
      then :SAMPLE_TESTS.SEQ := '16' || :SAMPLE_TESTS.TESTCODE;
    when 'L013'
      then :SAMPLE_TESTS.SEQ := '17' || :SAMPLE_TESTS.TESTCODE;
    when 'L014'
      then :SAMPLE_TESTS.SEQ := '18' || :SAMPLE_TESTS.TESTCODE;
    when 'L015'
      then :SAMPLE_TESTS.SEQ := '19' || :SAMPLE_TESTS.TESTCODE; 
    when 'L016'
      then :SAMPLE_TESTS.SEQ := '20' || :SAMPLE_TESTS.TESTCODE;
    when 'L017'
      then :SAMPLE_TESTS.SEQ := '21' || :SAMPLE_TESTS.TESTCODE;
    when 'L018'
      then :SAMPLE_TESTS.SEQ := '22' || :SAMPLE_TESTS.TESTCODE;
    when 'L019'
      then :SAMPLE_TESTS.SEQ := '01' || :SAMPLE_TESTS.TESTCODE;
    when 'L020'
      then :SAMPLE_TESTS.SEQ := '05' || :SAMPLE_TESTS.TESTCODE;
    when 'L021'
      then :SAMPLE_TESTS.SEQ := '13' || :SAMPLE_TESTS.TESTCODE;
    when 'L022'
      then :SAMPLE_TESTS.SEQ := '14' || :SAMPLE_TESTS.TESTCODE;  
    ELSE :sample_tests.seq := '';
END CASE;


The non-database field is character with a length of 6.

When I try to use this field in the order by property of the data block it is unable to perform query.

Is there another way?
Thanks,


Kevin
Re: Sort On Non-Database Column [message #490662 is a reply to message #490661] Wed, 26 January 2011 08:12 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Create a view that includes a column that represents your case statement. Base block on view.
Previous Topic: stacked canvas disappear
Next Topic: How to create cookie from Oracle forms
Goto Forum:
  


Current Time: Mon Sep 16 13:00:48 CDT 2024