Home » Developer & Programmer » Forms » Validate Item value in multiple records (Oracle Forms 10g)
Validate Item value in multiple records [message #600310] Mon, 04 November 2013 16:02 Go to next message
nrachovitsas
Messages: 2
Registered: November 2013
Location: Greece
Junior Member
Hi all,

This is my first post in the form and also i'm new to oracle forms technology.

I have the following issue:

In my form i have two Text-Fields to store some information for a claim:

A --> Profit and
B --> Loss
(only one of the filed can have value)

Also i have a data block where i store the reason of the claim (status).
Reason can take three values 1, 2, 3.
For each claim i can have more than one reasons stored in db table.

Target solution
if the user input more than one reasons, then if one of them is 1 Profit should be set unprotected and Loss should be set to protected.

I have the following issue.

Scenario
user creates a records with reason 1 : Profit text field is set to unprotected and Loss text filed is set protected.
user creates another record with reason 2: Profit text field is set to Protected and Loss text filed is set to unprotected. --> wrong

How can i validate the values of the two records and create the desired functionality?

I have used the POST-TEXT-ITEM trigger but it works correct only for one record. i i insert two records with the above order i have the issue i describe.

Could anyone know how to fix this?


Re: Validate Item value in multiple records [message #600311 is a reply to message #600310] Mon, 04 November 2013 16:09 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Modify PROFIT and LOSS items' "enabled" properties in WHEN-VALIDATE-ITEM trigger on REASON item; you'd do that using SET_ITEM_PROPERTY built-in - read how to use it in Forms Online Help System (while in Forms Builder, navigate to "Help" menu and search for SET_ITEM_PROPERTY. You'll see which properties have to be modified along with ENABLED in order to provide desired functionality).
Re: Validate Item value in multiple records [message #600312 is a reply to message #600311] Mon, 04 November 2013 16:15 Go to previous messageGo to next message
nrachovitsas
Messages: 2
Registered: November 2013
Location: Greece
Junior Member
Thanks for replying.

I know how to set the properties for the text fields.

My problem is based on the scenario i described
when the user creates the second record, i do not want to change the properties that was configured when the user created the first record.
Re: Validate Item value in multiple records [message #600341 is a reply to message #600312] Tue, 05 November 2013 01:05 Go to previous message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK then; would SET_ITEM_INSTANCE_PROPERTY satisfy your needs? It modifies properties for the current record's item properties, not for the whole block.
Previous Topic: forms 6i duplicate record
Next Topic: Trigger on save button??
Goto Forum:
  


Current Time: Sun May 19 08:08:09 CDT 2024