Home » Developer & Programmer » Forms » Sorting the Block after Querying values
Sorting the Block after Querying values [message #178548] Wed, 21 June 2006 08:36 Go to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
Is it possible to sort the values in the multi record block at any time after the values has been queried into the block.


For example the user queries the values, there is a Sort by Radio button options in the form so that the user can sort on his / her wish.

If the user selects the sort order and sort fields on the form and clicks go the multi record block should be refreshed with the sort order, how can it be done programmatically.

Thanks and Regards,

Nirmal Narayanan.
Re: Sorting the Block after Querying values [message #178558 is a reply to message #178548] Wed, 21 June 2006 09:20 Go to previous message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

Create EMP Multirecord form from scott schema.
create two fields empno_order and ename_order.
Make them checkboxes.
Value When Checked : Y
Value When unchecked := N
Initial Value : N
Checkbox Mapping of Other Values : Unchecked
Database Fields : No

Now create a button and write the following code:

IF CHECKBOX_CHECKED('EMP.EMPNO_ORDER') THEN
	SET_BLOCK_PROPERTY('EMP', ORDER_BY, 'EMP.empno');
ELSIF CHECKBOX_CHECKED('EMP.ENAME_ORDER') THEN
	SET_BLOCK_PROPERTY('EMP', ORDER_BY, 'EMP.ename');
END IF;
EXECUTE_QUERY;


Run the form, query the form. Select any check box to order by empno or ename. You'll get the required result.

regards,
Saadat Ahmad
Previous Topic: Problem with Sys_Context
Next Topic: form builder always runs the test form ..!!
Goto Forum:
  


Current Time: Fri Sep 20 10:24:54 CDT 2024