Home » Developer & Programmer » Forms » Runtime Remarks (form 6i)
Runtime Remarks [message #471038] Thu, 12 August 2010 01:04 Go to next message
shahzad-ul-hasan
Messages: 625
Registered: August 2002
Senior Member
Dear Sir,
pls find the attached file./forum/fa/8165/0/
i want to get the remarks on runtime.pls help me.
i have written this formula in when_validate_item.
declare
a number;
begin
a := nvl(:get_mark,0);
if a >= (33/100)*:get_mark then
:remarks := 'PASS'
else
:remarks := 'FAIL'
end if;
end;
but for sno 1 it gives me pass and for next record it shows pass. pls advised.
  • Attachment: TABLE.JPG
    (Size: 12.39KB, Downloaded 905 times)
Re: Runtime Remarks [message #471068 is a reply to message #471038] Thu, 12 August 2010 02:24 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This:
if a >= (33/100)*:get_mark

is never true.

For the first row:

get_mark = 7
a = get_mark = 7
if a > 0.33 * get_mark => if 7 > 0.33 * 7 => never true
Re: Runtime Remarks [message #471155 is a reply to message #471038] Thu, 12 August 2010 09:28 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 625
Registered: August 2002
Senior Member
:get_mark = 7
(i would not to initilize these but it can be pick on run time)
a = get_mark = 7
if a > 0.33 * get_mark
so its is correct way.pls advised if we include the loop. is this the correct way.


Re: Runtime Remarks [message #471159 is a reply to message #471155] Thu, 12 August 2010 09:43 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
No it's wrong.
Although Littlefoot is also wrong. It's always true.

Describe in words the logic to determine if a mark is a pass or fail.
Re: Runtime Remarks [message #471243 is a reply to message #471159] Fri, 13 August 2010 00:41 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
LOL, right! /forum/fa/1606/0/

I should have said that "remarks" will always be PASS (regarding sample input data). (Why didn't I say so? I wish I knew).

[Updated on: Fri, 13 August 2010 00:46]

Report message to a moderator

Previous Topic: Military time validation
Next Topic: Unable to load a dll in form builder
Goto Forum:
  


Current Time: Fri Sep 20 06:29:05 CDT 2024