problem with when-validate-item [message #401766] |
Wed, 06 May 2009 06:52 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Nincy666
Messages: 5 Registered: May 2009
|
Junior Member |
|
|
For example : I have 4 items (A,B,C,D) on a form. A and B have when-validate-trigger ,they have initial value and they are required. Validation trigger of item A set value of item C on 5 and validation trigger of item B set value of item D on 6.
If you skip items B and C (if you don't click it with mouse ) and you place mouse pointer directly into D, only trigger of first item (A) fires and set value of item C on 5. If you insert value 7 into D and than commit form , forms fires validation of item B and change value of D on 6. (validation unit = default)
How can I force when-validate-triggers of item (B) at time I skip it (before commit form)? Any idea ?
On ''real'' form i have more items which can user skip with mouse, but trigger must fires before commit form.
|
|
|
|
|
|
Re: problem with when-validate-item [message #401841 is a reply to message #401836] |
Wed, 06 May 2009 11:20 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Nincy666 wrote on Wed, 06 May 2009 17:04 | cookiemonster wrote on Wed, 06 May 2009 14:34 | you can't
|
Any workaround ?
|
To what?
The trigger not firing moment you bypass an item? - no
A more general issue? - maybe
What are you trying to achieve here?
|
|
|
Re: problem with when-validate-item [message #401843 is a reply to message #401839] |
Wed, 06 May 2009 11:22 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
klat wrote on Wed, 06 May 2009 17:13 | Hi,
if you always wants to set the value of eg: D to 7 then do it in pre-insert.
if you want you can do like..
if D is null then
d:=7;
end if;
|
Since when-validate-item will always fire before pre-insert I doubt that's going to be much help.
|
|
|
Re: problem with when-validate-item [message #401849 is a reply to message #401843] |
Wed, 06 May 2009 11:37 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
TonyJaa
Messages: 50 Registered: May 2009
|
Member |
|
|
This is not a code issue. D can't depend on two different rules
(set by WVI and set by the user). To resolve this problem, we can say :
1)D is set by WVI if D is null else D.
OR
2) D can't be set by user so make it protected against update.
But One things is clear : When commit_form WVI fires.
|
|
|
Re: problem with when-validate-item [message #401854 is a reply to message #401849] |
Wed, 06 May 2009 12:17 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Nincy666
Messages: 5 Registered: May 2009
|
Junior Member |
|
|
Thanks for your answers !
I want to offer user the values based on few items . I gave the simple example , that i easier described the problem.
User can change this offer values and if he changed them i don't want that forms overwrites it by commit_form by firing validation triggers of skipped items.
[Updated on: Wed, 06 May 2009 12:21] Report message to a moderator
|
|
|
Re: problem with when-validate-item [message #401973 is a reply to message #401854] |
Thu, 07 May 2009 03:12 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Nincy666
Messages: 5 Registered: May 2009
|
Junior Member |
|
|
I used when-mouse-down trigger on item C:
Quote: | validate(form_scope)
|
but this code firing when-validate-trigger of all items (also D) , what i don't want. Any other idea ?
For your answers I will very grateful
|
|
|
Re: problem with when-validate-item [message #402049 is a reply to message #401766] |
Thu, 07 May 2009 07:27 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
I wouldn't try and use mouse triggers for this, it'll just make matters even more complicated.
Why can't you just, as TonyJaa suggested, change the WVI triggers to only populate C and D if they are NULL?
Actually, does the default value of D vary with the value of B?
If it does then there's nothing you can do about D untill the user has entered a value in B anyway.
If not - why not just use a When-Create-Record Trigger?
|
|
|