Home » Developer & Programmer » Forms » when_validate_item
icon7.gif  when_validate_item [message #194799] Mon, 25 September 2006 06:43 Go to next message
icemelid
Messages: 15
Registered: April 2005
Location: BARCELONA
Junior Member

Hi,

Is it there a way to trigger query execution when
leaving a when_validate_item trigger ?

Tried execute_query, but it is not allowed in such
a trigger.

Thanks in advance
Ignasi
Re: when_validate_item [message #194806 is a reply to message #194799] Mon, 25 September 2006 07:22 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Not directly, as EXECUTE QUERY is a restricted procedure; you could, though, call it from the KEY-NEXT-ITEM trigger (if you restrict validation to this event).
Re: when_validate_item [message #195132 is a reply to message #194799] Wed, 27 September 2006 02:40 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What are you trying to do? What result do you want on the screen? Why 'execute-query' when you can do 'select' statments to poulate the other fields? Why not use a button?

David
Re: when_validate_item [message #195186 is a reply to message #194799] Wed, 27 September 2006 06:12 Go to previous messageGo to next message
icemelid
Messages: 15
Registered: April 2005
Location: BARCELONA
Junior Member

Hi,

Suppose you have a block based on a table:

1.- WHEN_NEW_BLOCK_INSTANCE do enter_query.
2.- WHEN_VALIDATE_ITEM on the first entering item do execute_query.

I could use KEY_NEXT_ITEM, but if you navegate with the mouse.

I could use a button, but I want more automatization.

Nobody seems to have the idea...

Thanks in advance.


Re: when_validate_item [message #195199 is a reply to message #195186] Wed, 27 September 2006 06:47 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Hi,

How do you know the first item here?

As a stupid user I just click somewhere in the block with the mouse and then ...sorry for your nice code in the when validate trigger on your first item, that happens to be not mine first item...

Regards

Rob Zijlstra
Re: when_validate_item [message #195472 is a reply to message #195199] Thu, 28 September 2006 20:44 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
If you want a field to be a search only field, then create a control block, put the non-database item on it, don't let the users go to the other fields. Use that item as the 'Copy Value from Item' property of your query block's item and have a button that does a go_block and an execute_query. No tricks, nothing sexy.

David
Previous Topic: how to restrict user to insert specific number of records (urgent)
Next Topic: first_record loop through an LOV
Goto Forum:
  


Current Time: Fri Sep 20 12:37:34 CDT 2024