Home » Developer & Programmer » Forms » form development (oracle form 10g)
form development [message #594213] Mon, 26 August 2013 05:11 Go to next message
nkumar0130
Messages: 54
Registered: August 2013
Location: Bangalore
Member
I have a requirement to develop a form from scratch level.

The form contain search criteria and a search button.

On pressing the search button it will display the search result just below the search criteria.
The search result contain two button, EDIT and DELETE button in each row.

I am new to this form development can anyone please help me regard this.
Re: form development [message #594215 is a reply to message #594213] Mon, 26 August 2013 05:25 Go to previous messageGo to next message
Littlefoot
Messages: 19600
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Your requirement is - in other words - called reinventing the wheel. Forms does everything you described by itself, you don't have to do anything about it. Here's how:
  • create a form using data block wizard
  • data block is based on a table
  • run a form
  • enter query mode
  • enter values you are interested in (that is your "search criteria")
  • execute query - results (if there are matches) are displayed on the screen
  • EDIT: click any item, modify its values, COMMIT changes you've made
  • DELETE: Forms toolbar contains the "delete record" button. Navigate to a record you want to delete, push the button, COMMIT these changes

Your description requires some programming; search criteria items are, most probably, not database items. In order to fetch correct data, you then need to set data block's DEFAULT_WHERE (or ONETIME_WHERE) condition (using SET_BLOCK_PROPERTY built-in) or, alternatively, use PRE-QUERY trigger to put search criteria items' values into data block items. Deleting can be done with a WHEN-BUTTON-PRESSED trigger which would call DELETE_RECORD built-in. Editing: no idea what you plan to do with that. Open selected record in another data block (a new canvas?)?

All in all, you can do that simple, easy and error-free, or you can do that in a complex, difficult and error-prone way. Pick one.
Re: form development [message #594222 is a reply to message #594215] Mon, 26 August 2013 06:19 Go to previous messageGo to next message
nkumar0130
Messages: 54
Registered: August 2013
Location: Bangalore
Member
Hi Littlefoot,

Thanks for your reply.
Its a requirement from a user that first block will contain search criteria and a search button. On pressing search button it will display the search result in second block.
Second block(search result block) will contain two button EDIT and DELETE button for each row. On pressing DELETE button it will delete the particular row, and on pressing EDIT button it will open another new canvas where we can edit the records.

I hope your second suggestion suits my requirement , can you please help me elaborate your description.

Thanks In Advance.
Re: form development [message #594231 is a reply to message #594222] Mon, 26 August 2013 07:47 Go to previous message
Littlefoot
Messages: 19600
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't know what else I should say ./fa/3314/0/
Previous Topic: Storing a value in Copy BUFFER
Next Topic: Data block based on join, tables in different schema
Goto Forum:
  


Current Time: Mon Sep 15 22:32:06 CDT 2014

Total time taken to generate the page: 0.05545 seconds