Home » Developer & Programmer » Forms » need help
need help [message #457179] Fri, 21 May 2010 09:38 Go to next message
paracoda12
Messages: 3
Registered: May 2010
Location: amman
Junior Member

hello everyone ... im working on aproject for my university which is talk about e registration system for student i have finished all forms at most.. but i have aproblem in the registeration adding or remove subjects i need acode or something when student is going to register for the new semester it checks if u took the subject before or no ,, the other check is if you are going to register for 21 hours it checks the average if its above 80's or not ...

regards
Re: need help [message #457202 is a reply to message #457179] Fri, 21 May 2010 15:48 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
it checks if u took the subject before or no

This might be done in WHEN-VALIDATE-ITEM trigger, using something like
select 'x' into l_already_took_it
from subjects
where student_id = :student_id
  and subject_id = :subject_id;

if l_already_took_it is not null then
   message('Can not take the same subject twice');
   raise form_trigger_failure;
end if;


I didn't understand the other question (21 hours ... above 80's). Could you explain it once again?
Re: need help [message #457208 is a reply to message #457202] Fri, 21 May 2010 17:51 Go to previous messageGo to next message
paracoda12
Messages: 3
Registered: May 2010
Location: amman
Junior Member

first of all thanks for your reply ..but could u explain me this could plz...

about the second question every student maximum number of hourse(subjects) is 18 but he can register for 21 hourse if his average is 80 or more

regards
Re: need help [message #457253 is a reply to message #457208] Sat, 22 May 2010 09:32 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It would be additional check in the same WHEN-VALIDATE-ITEM trigger. Calculate student's average and number of subjects he/she registered so far. Allow registering if
a) number of subjects is less than 18 or
b) numer of subjects is less than 20 and average is higher than 80.
Re: need help [message #457262 is a reply to message #457253] Sat, 22 May 2010 10:24 Go to previous messageGo to next message
paracoda12
Messages: 3
Registered: May 2010
Location: amman
Junior Member

so how can i write that in the code ???
Re: need help [message #457274 is a reply to message #457262] Sat, 22 May 2010 15:18 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
By translating words into commands, I guess.

Average is calculated with the AVG function. Number of subjects with the COUNT function.
Previous Topic: Filter HardCoded values in List Item (Tlist) based on value entered in Text Item
Next Topic: suggestion regarding data copy into other user
Goto Forum:
  


Current Time: Thu Sep 19 17:59:37 CDT 2024