Home » Developer & Programmer » Forms » enable buttons after the query
enable buttons after the query [message #203707] Thu, 16 November 2006 01:55 Go to next message
cong
Messages: 25
Registered: June 2006
Junior Member
Hi! I need to enable buttons only if there are records fetched. I tried putting the set_item_property statements in post_query but it fires only after I go to the 2nd record. How do I go about it?
Re: enable buttons after the query [message #203776 is a reply to message #203707] Thu, 16 November 2006 05:08 Go to previous messageGo to next message
pchircop
Messages: 4
Registered: November 2006
Junior Member
Hi,

Append a "KEY-ENTQRY" at form level

set_item_property('your_button',ENABLED,PROPERTY_FALSE);
ENTER_QUERY;
set_item_property('your_button',ENABLED,PROPERTY_TRUE);
set_item_property('your_button',NAVIGABLE,PROPERTY_TRUE);

Hope it helps!

Regards
Re: enable buttons after the query [message #203888 is a reply to message #203707] Thu, 16 November 2006 19:23 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Do you have one button per row, or multiple buttons for the whole set of records?

David
Re: enable buttons after the query [message #203913 is a reply to message #203707] Thu, 16 November 2006 23:10 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

I have 5 buttons in a canvas.
Re: enable buttons after the query [message #203917 is a reply to message #203913] Thu, 16 November 2006 23:28 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Is that 5 button, one to each row, each saying 'Press me', or 5 buttons across the top saying 'A', 'B', 'C', 'D', and 'E'.

David
Re: enable buttons after the query [message #203931 is a reply to message #203707] Fri, 17 November 2006 00:19 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Sorry for that David, I post on a wrong thread. Razz
Re: enable buttons after the query [message #203954 is a reply to message #203776] Fri, 17 November 2006 01:28 Go to previous messageGo to next message
cong
Messages: 25
Registered: June 2006
Junior Member
How will I check if there are records fetched after executing the query?
Re: enable buttons after the query [message #203961 is a reply to message #203954] Fri, 17 November 2006 01:46 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
@wency - I should have checked the name of the poster, my mistake.

@cong - typically you will see them on the screen and if no rows are returned you will get the message 'no record found'. You can also use the 'count_query' command. Please read the documentation or search this forum for extra information about 'count_query'.

David
Re: enable buttons after the query [message #204317 is a reply to message #203954] Mon, 20 November 2006 02:33 Go to previous message
pchircop
Messages: 4
Registered: November 2006
Junior Member
Test
' IF block_status='NEW' => no record !
IF :system.blok_status!='NEW' THEN
Previous Topic: How to Solve this COUNT problem
Next Topic: HELP : PROBLEM IN MENU .
Goto Forum:
  


Current Time: Fri Dec 09 01:59:05 CST 2016

Total time taken to generate the page: 0.12607 seconds