Home » Developer & Programmer » Forms » problem with formula col (ora8i form 6.0)
problem with formula col [message #295339] Tue, 22 January 2008 02:53 Go to next message
orarep
Messages: 56
Registered: September 2007
Member
hi all

i have tabular form in which one of the item is formula item and it calculate the obtained marks of a gc. now when one of the col e.g sessional test makrs , is null i.e student not appeared so formula col doesn;t work
the follwoing formula is written in formula col

:std.st1+:std.st2+:std.quiz+:std.final

now how can i calculate the mks even i have written the same formula on key-next-item trigger of every participating col but even then when one of col is null so it won't work

pleasez gudie

regards

orarep
Re: problem with formula col [message #295358 is a reply to message #295339] Tue, 22 January 2008 03:35 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Use the NVL function:
NVL(:std.st1, 0) + NVL(:std.st2, 0) + NVL(:std.quiz, 0) + NVL(:std.final, 0)
Re: problem with formula col [message #296363 is a reply to message #295358] Sat, 26 January 2008 03:21 Go to previous messageGo to next message
orarep
Messages: 56
Registered: September 2007
Member
thanks for replying

well yes i had the same idea but here student do take zero marks so then how to tackle then and infact i have many data validation checks on save button regarding a student not appearing and that is 'reson for not appearing'so when a clerk leave empty any exam col so he is asked for the reason to enter if he left the reason col empty for that student

so if u have any other idea plzz let me know. i am also working on it


thanks

regards
Re: problem with formula col [message #296376 is a reply to message #296363] Sat, 26 January 2008 06:17 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Please, try again. You've written several lines of text without any punctuation and I don't quite understand what you maant to say. It is extremely difficult to follow your thoughts if you don't use punctuation marks (and, preferably, capital letters at the beginning of a sentence).

What do you want to do, actually? Are you saying that someone can get a 0 (zero) as a mark? What kind of a mark is it? Who gets 0? Those who don't say a word during an exam?

Furthermore, if you've done validation, how could anyone get a NULL in one of the ":std...." items? Oh, yes - if he/she didn't appear. Can you explain what you'd like to do with such a student? How would you calculate a sum? If you don't want to use 0 in the NVL function, use something else (the question is: what?).
Re: problem with formula col [message #296437 is a reply to message #296376] Sun, 27 January 2008 04:08 Go to previous messageGo to next message
orarep
Messages: 56
Registered: September 2007
Member
hello littlefoot


1)if a student do not appear in any test/exam his respective exam col will be left blank

2) if a student appear and he gets nothing i.e he attempt 1 question out five and even in this question he is getting zero

i hope i have clear the things


so now i have the same question how l formula col will do calculation when null is there in nay col?

so any idea sir

regards
Re: problem with formula col [message #296451 is a reply to message #296437] Sun, 27 January 2008 09:40 Go to previous message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I still think that NVL is the way to do that, just as I've said in my first answer to your question.
Previous Topic: Inserting into db from form
Next Topic: forms
Goto Forum:
  


Current Time: Wed Dec 07 04:54:18 CST 2016

Total time taken to generate the page: 0.06224 seconds