Don't know which triggers to use, please help.

Hi,
I'm a newbie to forms. I have a question about what triggers to use for my situation. I can't seem to find many examples for what I want to accomplish. I have tried using the online help (within forms) but sometimes they don't always have examples for their triggers).
Here's my scenario:
I have six items, five of which are text database items and one is a non-database display item (TOTAL). Each of the first 5 items holds a numeric value and the TOTAL item will store the sum of the previous 5. Of first 5 items, only the 4th item (POINTS) can be updated within the form (and I have set the Enabled propety to 'No' for the first 3 items). I have a function, TOTAL_COUNT, that will do the sum calculation and it works fine in a POST-QUERY trigger populating the value into TOTAL. However, what I'd like to do is anytime a user enters a new value in POINTS and then tabs or mouse clicks into the next item TOTAL, I'd like to call my function to update and display the new total value in TOTAL.
Does anyone know which triggers and/or code I can use to accomplish this? The code I use to call a function is:
:block_name.item := function_name(:parameter)
For your recommed triggers, can I just use that code to call my function or will I need any other syntax i.e. BEGIN...END, etc within the trigger body?
Any quidence would be greatly appreciated.
Thank you,
Eric

Hi!
1. Set Calculation Mode property of ITEM_5 to Formula.
Formula property:
nvl(:Block_Name.ITEM_1, 0) + nvl(:Block_Name.ITEM_2, 0) + nvl(:Block_Name.ITEM_3, 0) + nvl(:Block_Name.ITEM_4, 0)
OR
Function_Name(Param_1,... Param_N);
Have in view of, that the ITEM_5 data will not be saved in DataBase.
2. When-Validate-Item trigger is usfull when is necessary to store calculated item data in DataBase.
Rename you Post-Query trigger to When-Validate-Item.
Modify trigger: Store calculation result in the variable.
(Don't forget to round variable value!)
Then compare it with ITEM_5. If they are different - :ITEM_5 := var_name.
I prefer the first method.

Similar Messages

Maybe you are looking for

  • Chart in Sub Vi is empty

    Hi, I created a Sub VI that creates a chart, formats it and exports the chart to JPG format. Now when I call the Sub Vi this doesn't work. I am only getting an empty chart displayed in the JPG format. It only works if I have the Sub Vi open at the sa

  • Apple wireless keyboard multimedia key not working well??

    it's strange, i cannot use the multimedia key at all with a mini, no matter with fn combination or not. i cannot activate playbacak function on f7 to f9. even change speaker volume with f11 n f12 key. i have check system preference with the fn key as

  • Can't Get Crossfade to Work

    Hi, I've been using iTunes for several years, but lately I cannot get the Crossfade to activate. I've tried changing it, restarting the app, rebooting, even deleting the iTunes preference file. Nothing works. Every song goes right until the last seco

  • How do I stop system sounds when using AirPlay on my MacBook Pro?

    Hi all, Probably a quick question, but I'm fairly new to Macs. I've a Macbook Pro 13 Late 2011 and now I've got an Apple TV, I use AirPlay. But how do I stop system sounds when using AirPlay? Many thanks in advance, Jon.

  • How to improve performance of my query

    Hello Friends, Good Morning. I am having the following query which is never ending - Can any one throw some light on how to improve the performance of my said said query ..This is the query generated in ODI ( ORACLE DATA INTEGRATOR 11G ) The only thi