Home » Developer & Programmer » Forms » to make/update entries in incremental order only (Oracle forms suit 10g)
to make/update entries in incremental order only [message #650817] Wed, 04 May 2016 07:33 Go to next message
kumarravik
Messages: 32
Registered: January 2016
Location: delhi
Member
Hi,

i want to put a restriction in a text field (number data type) based on another text field (calender field) so that if any user want to enter new data (number data type), it should be in either same or in incremental sequence only. or if user updates the previous data, it should not be lesser than previous data entered.

like, if a user enters new data in text filed for july month, the data should be either similar to june or it should be larger to june.
same should be applied if he updates any previous entered data.

note: the text field receives numeric data only.

please suggest, thanks.




Re: to make/update entries in incremental order only [message #650823 is a reply to message #650817] Wed, 04 May 2016 09:01 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Use a select in the WVI trigger to get the max value currently in the DB.
Ensure entered value is > max value.

Make sure each record the user enters is posted to the DB (with post built-in) before they move onto the next one.
Re: to make/update entries in incremental order only [message #650904 is a reply to message #650823] Fri, 06 May 2016 07:22 Go to previous messageGo to next message
kumarravik
Messages: 32
Registered: January 2016
Location: delhi
Member
Thanks mate.

however, now i have an another issue. while compiling the form, getting error "bad bind Variable".

my code is like this:

declare

var1 product.pl%type

begin
select max(pl) into var1 from product;
if
blk_prod.product<var1 then
RAISE FORM_TRIGGER_FAILURE;
end if;
end;
Re: to make/update entries in incremental order only [message #650912 is a reply to message #650904] Fri, 06 May 2016 08:43 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
block items have to be preceded with a colon in forms code.
Re: to make/update entries in incremental order only [message #651440 is a reply to message #650912] Wed, 18 May 2016 00:04 Go to previous message
kumarravik
Messages: 32
Registered: January 2016
Location: delhi
Member
thanks mate for your help.

The block item name was preceded with a colon to access the value of it but i was kept getting this 'bad bind variable ' error.

next day, when i re-started my system and compiled the form again, it went well, .fmx created without any error Razz .

Cheers!
Previous Topic: Running Oracle 10g web application, locally without internet
Next Topic: Global Page
Goto Forum:
  


Current Time: Fri Mar 29 03:08:59 CDT 2024