Home » Developer & Programmer » Forms » delete and combobox in oracle datagrid? beginner pls help (oracle forms6i patch 17, oracle 10g)
delete and combobox in oracle datagrid? beginner pls help [message #346249] Sun, 07 September 2008 22:47 Go to next message
oeuf85jap@yahoo.co.jp
Messages: 5
Registered: September 2008
Location: Japan
Junior Member
Hi Embarassed

Im a super beginner in Oracle Forms. I found this forum by searching in google, I hope that someone can help me.

I need to convert an old VBA application to Oracle Forms 6i using Oracle 10g database. I have attached the sample screen shot of the form.

I tried to read the documentations, tutorials, etc but i could not find some of the topics that i need to know.
I hope that someone can help me.

1. I tried to use the data block and layout wizard. it generated the datagrid part(table part) in textboxes, how can i add a checkbox and combobox that is linked to a hidden ID field?

2. in the combobox in the datagrid(table) i need to populate the combobox based on the hidden ID field, What event should i use, or create?

3. After using the wizard it generated the datagrid(table), but when i ran the application it does not automatically populate/get the data, i will need to push the "query button" to see the data. is there a way to pupulate it on form load?

4. In a master-detail form, how can i change the datasource or SQL of the datagrid(table) when the value of the master block changes? example when i change a combobox in the master block, the detail should change depending on the value in master block.

thank you very much
sorry for my poor english.
Re: delete and combobox in oracle datagrid? beginner pls help [message #346284 is a reply to message #346249] Mon, 08 September 2008 01:23 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
1) I suggest you use a LOV based on a 'record_group' for each item.

2) This 'hidden' information will be part of the 'select' statement in the 'record_group'.

3) In the 'When-New-Forms-Instance' trigger, assuming your 'master' block is the first block defined, issue the command 'execute_query;'.

4) This should be automatic, and is defined by the 'relations' between the two blocks.

David
Re: delete and combobox in oracle datagrid? beginner pls help [message #346294 is a reply to message #346284] Mon, 08 September 2008 02:21 Go to previous messageGo to next message
oeuf85jap@yahoo.co.jp
Messages: 5
Registered: September 2008
Location: Japan
Junior Member
Smile Hi Mr. David

thank you very much for your prompt reply.
I have already solved the master-detail and the execute_query.
thank you for your help.

1.
However, I do not know 'record_group', when I clicked recordgroup in the toolbox there is a window that popsup, I should type the SQL string there rigth?

Do you mean that I should not use the wizard and manually drag and drop the textboxes needed?

if that is the case, how will the program know which line of checkbox is checked for deletion?

im very sorry, but could you provide some more details.

2.
I know that this is a dumb question, i attached an image, when i drag the checkbox, grouped checkboxes appears. im new to oracle so i would like to know if i should seperate them or is it ok? i can't align it with the rows generated by the wizard.

thanks in advance
Re: delete and combobox in oracle datagrid? beginner pls help [message #346558 is a reply to message #346294] Mon, 08 September 2008 20:26 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
1) This answer was for the combobox. Highlight 'Record Groups', press '+' (Create), then press 'Help' for more information. Yes, place the 'select' statement here.

The checkbox needs to be in the same block as your records so that each checkbox is automatically associated with a specific record.

Play with the 'Distance Between Records' property of the item. (Go to the 'Find:' slot of the 'Property Pallette' and type 'DIS'.)

David
Re: delete and combobox in oracle datagrid? beginner pls help [message #346845 is a reply to message #346249] Tue, 09 September 2008 19:27 Go to previous messageGo to next message
oeuf85jap@yahoo.co.jp
Messages: 5
Registered: September 2008
Location: Japan
Junior Member
Smile Hi thank you for your reply.

i tried the combobox and it worked, thank you very much.
however, i would like to go back to my previous question

Q:[4. In a master-detail form, how can i change the datasource or SQL of the datagrid(table) when the value of the master block changes? example when i change a combobox in the master block, the detail should change depending on the value in master block.]

A:[4) This should be automatic, and is defined by the 'relations' between the two blocks.]

In the screen shot that is attached, I created the combobox using the "record group" method. It worked, but the problem is that when i change the value of the combobox, the detail part does not change. How can I change the SQL statement or put condition in the detail part of the screen?
Re: delete and combobox in oracle datagrid? beginner pls help [message #346919 is a reply to message #346845] Wed, 10 September 2008 01:46 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Do you have two blocks? Have you defined a 'Relations' on the first block to the second block?

David
Re: delete and combobox in oracle datagrid? beginner pls help [message #347152 is a reply to message #346919] Wed, 10 September 2008 21:20 Go to previous messageGo to next message
oeuf85jap@yahoo.co.jp
Messages: 5
Registered: September 2008
Location: Japan
Junior Member
Thanks for the reply. Smile

Yes, I have an employee block and a department block.
the relation is in the department block

Detail data block: Employees
Condition: EMPLOYEES.DEPARTMENT_ID = DEPARTMENTS.DEPARTMENT_ID

is there something wrong with the property?
what trigger should I add in the combobox to change the detail part of the screen?
Re: delete and combobox in oracle datagrid? beginner pls help [message #347185 is a reply to message #347152] Thu, 11 September 2008 00:42 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Search this forum for 'go_block execute_query master detail'.

David
Re: delete and combobox in oracle datagrid? beginner pls help [message #347485 is a reply to message #347185] Thu, 11 September 2008 19:40 Go to previous message
oeuf85jap@yahoo.co.jp
Messages: 5
Registered: September 2008
Location: Japan
Junior Member
Hi thanks for the reply

I entered the where clause in the employee block and go_block in the combobox trigger and it worked.

thank you very much for the help Smile
Previous Topic: Call .Net web services from Forms
Next Topic: File Transfer forbidden
Goto Forum:
  


Current Time: Fri Sep 27 16:23:53 CDT 2024