Home » Developer & Programmer » Forms » How to validate each record if the number of records displayed e.g. =2 in oracle forms
How to validate each record if the number of records displayed e.g. =2 in oracle forms [message #655474] Wed, 31 August 2016 12:48 Go to next message
Soulami
Messages: 23
Registered: August 2016
Junior Member
Hi,

How to validate each record if the number of records displayed e.g. =2 in oracle forms

So even if the item has values, its showing that the value is not there. Warning is thrown in all cases. If it has values or its not.

So I printed the values of that block and it came null. Though the values are there in the item box.

Kindly suggest.
Re: How to validate each record if the number of records displayed e.g. =2 in oracle forms [message #655475 is a reply to message #655474] Wed, 31 August 2016 13:57 Go to previous messageGo to next message
Littlefoot
Messages: 21612
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't understand what number of records has to do with their validation?

Anyway: WHEN-VALIDATE-RECORD block-level trigger might be what you are looking for.

As of the way you check values, why wouldn't you run the form in debug mode (if you're on Forms 9i or higher)? It helps a lot, simply by making things easier to see.
Re: How to validate each record if the number of records displayed e.g. =2 in oracle forms [message #655476 is a reply to message #655475] Wed, 31 August 2016 14:00 Go to previous messageGo to next message
Soulami
Messages: 23
Registered: August 2016
Junior Member
when-validate-record trigger i should use on every item which i need to validate ? is that what you meant?
Re: How to validate each record if the number of records displayed e.g. =2 in oracle forms [message #655477 is a reply to message #655476] Wed, 31 August 2016 14:06 Go to previous messageGo to next message
Littlefoot
Messages: 21612
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No, I meant what I said: WHEN-VALIDATE-RECORD block-level trigger etc.

If you want to validate items, then use WHEN-VALIDATE-ITEM (isn't that obvious?).
Re: How to validate each record if the number of records displayed e.g. =2 in oracle forms [message #655478 is a reply to message #655477] Wed, 31 August 2016 14:09 Go to previous messageGo to next message
Soulami
Messages: 23
Registered: August 2016
Junior Member
yes yes it is. Okay let me check using when-validate-item for the items
Re: How to validate each record if the number of records displayed e.g. =2 in oracle forms [message #655480 is a reply to message #655477] Wed, 31 August 2016 14:23 Go to previous messageGo to next message
Soulami
Messages: 23
Registered: August 2016
Junior Member
no,it didnt
Re: How to validate each record if the number of records displayed e.g. =2 in oracle forms [message #655481 is a reply to message #655480] Wed, 31 August 2016 14:25 Go to previous messageGo to next message
Soulami
Messages: 23
Registered: August 2016
Junior Member
my doubt is ,the items has values and i have just set a warning on key-commit of form level,that if any of those items are null,it should show the warning.

It throws warning in both the cases.

I should assign its value into a variable in pre-query?

i mean store it somewhere

Since when i print the values of those items its coming as null,

though it has values in those items
Re: How to validate each record if the number of records displayed e.g. =2 in oracle forms [message #655498 is a reply to message #655481] Thu, 01 September 2016 01:22 Go to previous messageGo to next message
Littlefoot
Messages: 21612
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I wouldn't validate anything in KEY-COMMIT; WHEN-VALIDATE- triggers should be used for that.

There's no need to store anything into any variables in PRE-QUERY (at least, I don't see any reason why would you do that).

Basically, you are saying that
- there's an item
- you see its value on the screen
- when checking whether the value exists, it appears to be empty

How exactly do you do that? Please, post a screenshot (which shows the form) and trigger code (properly formatted, enclosed into [code] tags to preserve formatting).
Re: How to validate each record if the number of records displayed e.g. =2 in oracle forms [message #655544 is a reply to message #655498] Thu, 01 September 2016 12:32 Go to previous messageGo to next message
Soulami
Messages: 23
Registered: August 2016
Junior Member
Hello,

You want the screenshot attached of the form? Trigger code of key-commit which is checking whether its null or not?
Re: How to validate each record if the number of records displayed e.g. =2 in oracle forms [message #655560 is a reply to message #655544] Fri, 02 September 2016 02:17 Go to previous message
cookiemonster
Messages: 13895
Registered: September 2008
Location: Rainy Manchester
Senior Member
Yes and yes
Previous Topic: FRM-40738 ERROR IN ORACLE FORMS
Next Topic: How to restrict a warning coming as many times I click on Execute (f5) button in oracle forms
Goto Forum:
  


Current Time: Tue Oct 27 02:18:11 CDT 2020