Regarding form [message #161804] |
Tue, 07 March 2006 05:13 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
orafan2003
Messages: 122 Registered: February 2006
|
Senior Member |
|
|
Hi ,
I am designing a DISPLAY FORM.
The form is as follows. Product_type
X
Y
Product Excellent Good Poor N/A
X1 2 2 3 1
X2 1 2 1 2
Y1 3 1 2 0
Y2 2 2 2 2 When I select the Product_type as X, both the products X1 and X2 get selected. Similarly when I select Y both Y1 and Y2 get populated.
I already wrote the code for it.
I created a Entry form where I can rate products as excellent, good, poor or N/A. The Entry form is as follows:
People_name Product_type
Alex X
John Y
Tom
Jay
Product Rate
X1 .Excellent .Good .Poor .N/A
X2 .Excellent .Good .Poor .N/A
Y1 .Excellent .Good .Poor .N/A
Y2 .Excellent .Good .Poor .N/A Now in my Display form, When I select product_type as X, X1 and X2 are getting populated.
Now my query is as follows:
In the display form,
1)I should be able to see how many people rated excellent , good, poor, N/A regarding product X1. Likewise for X2,Y1,and Y2.
2)Also I want to see the names of people who rated excellent, good, poor and N/A . Can I do this using alert?
I wrote the logic.
select count(people.people_name) from people, ratings, products
where products.product='X1' and ratings.rating='Excellent';
Please tell me how to achieve this task.
People table has People_name, Ratings table has ratings and products table has product.
Kindly help me.
Thanks & Regards,
[Updated on: Tue, 07 March 2006 17:52] by Moderator Report message to a moderator
|
|
|
|
|
Re: Regarding form [message #162033 is a reply to message #161804] |
Wed, 08 March 2006 05:11 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
orafan2003
Messages: 122 Registered: February 2006
|
Senior Member |
|
|
Hi,
My requirement has slightly changed.
In the Display form, when I select the product_type as X , we see that both X1 an X2 are populated. Similarly the ratings ie Excellent,Good and poor should show me how many people have voted against them in the back end.This is somewhat like a report.Only for viewing how many people have voted for each product.
How can I achieve this task?
|
|
|
|
Re: Regarding form [message #162441 is a reply to message #162150] |
Fri, 10 March 2006 04:18 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
orafan2003
Messages: 122 Registered: February 2006
|
Senior Member |
|
|
Hi,
This is the code that I have written in the when_new_block instance of CSKILLS .DECLARE
EMP_ID NUMBER;
BEGIN
set_block_property('cskills',default_where,'skill_type_id in (select skill_type_id from pskills where skill_type=:CONTROL.SPRIMARY)');
select count(emp_id) into :CSKILLS.EXCELLENT from entries where rating_id=1 and
skill_id=(select skill_id from cskills where skill=:CSKILLS.SKILL);
select count(emp_id) into :CSKILLS.GOOD from entries where rating_id=2 and
skill_id=(select skill_id from cskills where skill=:CSKILLS.SKILL);
select count(emp_id) into :CSKILLS.POOR from entries where rating_id=3 and
skill_id=(select skill_id from cskills where skill=:CSKILLS.SKILL);
END; My query doesn't work.Kindly help
[Updated on: Mon, 13 March 2006 00:44] by Moderator Report message to a moderator
|
|
|
|
|
Re: Regarding form [message #162740 is a reply to message #162681] |
Mon, 13 March 2006 06:59 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
orafan2003
Messages: 122 Registered: February 2006
|
Senior Member |
|
|
Sir,
My form is working ....ie I am able to view the number of people against each rating.
Primaryskill
Oracle
Java
Skill Excellent Good Poor
SQL 1 2 1
PLSQL
Only when I highlight PLSQL , I can see the ratings of PLSQL ...but in the same row as in SQL. What could be the reason for this error?? The values returned are correct...but the values should be displayed against the respective skill. That is not happening.
There is one more doubt.
When I click on "Oracle", I can see SQL and PLSQL. Similarly for Java, I can see J2ee and Servlet.
I want to have something like "All" ,which will diaplay all skills.
In the When_list_changed of Primaryskills, I wrote :
go_block('cskills');
Execute_query;
And in the prequery of cskills, I wrote:
set_block_property('cskills',default_where,'skill_type_id in (select skill_type_id from pskills where skill_type=:CONTROL.SPRIMARY)');
What additions can I make to my code?
I tried writing this but it did not work.
if not :control.sprimary='All' then
set_block_property('cskills',default_where,'skill_type_id in (select skill_type_id from pskills where skill_type=:CONTROL.SPRIMARY)');
else
-----
Kindly help me.
[Updated on: Tue, 14 March 2006 00:14] by Moderator Report message to a moderator
|
|
|
Re: Regarding form [message #162889 is a reply to message #162740] |
Tue, 14 March 2006 00:16 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Try begin
if not :control.sprimary = 'All' then
set_block_property
('cskills',
default_where,
'skill_type_id in (select skill_type_id from pskills where skill_type=:CONTROL.SPRIMARY)');
else
set_block_property ('cskills', default_where, null);
end if;
end;
David
[Updated on: Tue, 14 March 2006 00:18] Report message to a moderator
|
|
|
Re: Regarding form [message #162944 is a reply to message #162889] |
Tue, 14 March 2006 04:39 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
orafan2003
Messages: 122 Registered: February 2006
|
Senior Member |
|
|
Sir,
Thank you so much. It is working!!!
I made a small change.
In set_block_property ('cskills', default_where, null);
It gave me a error so I changed null to ' ' .It is working perfectly now.
Thank you so much for your guidance and help.
Sir, Please guide me in my other query too....The values returned are correct but they are be displayed against the respective skill ..they are displayed in the same row as in SQL..
Please guide me.
|
|
|
|
Re: Regarding form [message #163146 is a reply to message #163075] |
Wed, 15 March 2006 01:58 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
orafan2003
Messages: 122 Registered: February 2006
|
Senior Member |
|
|
Sir,
I uploaded a snapshot of my screen.
As I said earlier, the code is working fine...but the result for 2nd, 3rd or 4th row is also getting retrieved in the 1st row. I need to just highlight on the skill ..the result will be seen only in the first row and not the respective rows of the skill.
Thank you.
|
|
|
|
|
Re: Regarding form [message #163330 is a reply to message #163281] |
Thu, 16 March 2006 04:39 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
orafan2003
Messages: 122 Registered: February 2006
|
Senior Member |
|
|
Sir,
I moved the three items(excellent, good and poor) to cskills block.I tried to populate using post-query trigger(on cskills block)...but my secondary skills are also not getting displayed now. In the console I am getting a message that I should enter something into the skill. If I enter each skill name and press Tab key, I am able to view the ratings. How can I proceed now?
|
|
|
|
|
Re: Regarding form [message #166371 is a reply to message #163851] |
Thu, 06 April 2006 00:51 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Orafan,
Sorry that it has been so long since I got back to you on your question. How have you progressed with it?
I have created your tables and loaded the data. I assume that the zero values in the 'rating_id' of the 'entries' table are actually 'null' values. This is because there is no zero in the 'ratings' table and there is a foreign key relationship between the 'rating_id' on 'entries' and 'rating_id' on 'ratings'.
Would you please consider attaching the current version of your forms so that I can look at them.
David
|
|
|