Hi,
I have a multi row block on my form with fields for (eg. Name, Address etc.)
2 buttons on the form....
What I want is at runtime
- when I click the first button called NAME...it will order the block by NAME
- When I click the second button called Address it will order the block data by Address...
Can u help...Im really stuck with this...
thanks....
ASH
Use set_block_property to modify the default "order by" clause and requery.
ORDER BY
Originally posted by nealh
Use set_block_property to modify the default "order by" clause and requery.
is there any chance u could help me with the code I have no idea to be honest
thanks
aSH
Hi Ash,
Include the following code in WHEN-BUTTON-PRESSED trigger of the NAME button :
set_block_property(ORDER_BY, 'NAME') ; /*Check Syntax*/
Execute_Query ;
Similarly, for Address button :
set_block_property(ORDER_BY, 'ADDRESS') ; /*Check Syntax*/
Execute_Query ;
Hope this helps.
THANKS ILL TRY IT OUT THNAKS A LOT
ASH
Originally posted by Pinakin
Hi Ash,
Include the following code in WHEN-BUTTON-PRESSED trigger of the NAME button :
set_block_property(ORDER_BY, 'NAME') ; /*Check Syntax*/
Execute_Query ;
Similarly, for Address button :
set_block_property(ORDER_BY, 'ADDRESS') ; /*Check Syntax*/
Execute_Query ;
Hope this helps.
I would recommend making the buttons toggle between ASC and DESC for the field to be ordered on. For example:
WHEN_BUTTON_PRESSED Trigger for name button:
begin
if get_block_property('BLOCK_NAME',default_where) = 'NAME ASC' then
set_block_property('BLOCK_NAME', default_where,'NAME_DESC');
else
set_block_property('BLOCK_NAME',default_where, 'NAME ASC');
end;
Dear Ash,
Are u done with that? If so then forget it else send me the form i will do it for ya..!
regards,
NK
Originally posted by nabeel
Dear Ash,
Are u done with that? If so then forget it else send me the form i will do it for ya..!
regards,
NK
Yes that worked like a treat...thanks a lot appreciate it
ASH
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width
Bookmarks