Home » Developer & Programmer » Forms » fetching form values into a plsql table
fetching form values into a plsql table [message #164395] Thu, 23 March 2006 05:08 Go to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
I am having a form with a multi-record block. I need to fetch each record into a plsql record collection or record of type of rowtype.

Any one have idea ?

Thanks

nirmal
Re: fetching form values into a plsql table [message #164435 is a reply to message #164395] Thu, 23 March 2006 07:31 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You could create a stored procedure which would fetch data into an index-by table and create form block based on this procedure.
Re: fetching form values into a plsql table [message #164440 is a reply to message #164435] Thu, 23 March 2006 08:25 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
No,i need to do the reverse thing here, After querying values into the form i need to populate record by record into a plsql record and while committing the form i need to check the plsql record values with the queried values, for any change. i need to do this since the form is having only one-block and this block will be a non-database block, to which values will be queried in.

As the user changes the values and go to the next record, i have to populate the record with the current record on the form,like this until the user commits the form and while commiting the form i will check the plsql record with queried values from the cursor and give a message to the user for making changes permanent , if the user answers in favour changes will be made or else not, this is the idea.

I cannot make the block based on a table or view due to some data validations on each record.

Thanks

Nirmal
Re: fetching form values into a plsql table [message #164539 is a reply to message #164440] Thu, 23 March 2006 22:31 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Populate block using cursor
http://www.orafaq.com/forum/m/605/67467/?srch=populate+block+cursor+create_record#msg_605
and my feelings about it.
http://www.orafaq.com/forum/m/134237/67467/?srch=populate+block+cursor+create_record#msg_134237

Loading data into a block MANUALLY
http://www.orafaq.com/forum/m/111031/67693/#msg_111031
MANUAL previous and next master key record retrieval
http://www.orafaq.com/forum/m/111031/67693/#msg_111031
Sample MANUAL get employees form
http://www.orafaq.com/forum/t/52330/67467/

David
Re: fetching form values into a plsql table [message #164553 is a reply to message #164539] Thu, 23 March 2006 23:53 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
My requirement is
Populate a PL/SQL table or record or collection with the values in the FORM, while the user navigates to the next record.

i.e, when the user navigates to the second record on the form, values of first record in the form must be passed to the plsql table or collection or record.

Any idea ?

Nirmal
Re: fetching form values into a plsql table [message #164826 is a reply to message #164553] Sun, 26 March 2006 22:47 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you looked at the Post-Record trigger? I assume that the PL/SQL thingy was created in the When-New-Form-Instance trigger. Get the 'row' number with a get_block_property ('blk', current_record) and use that value as your 'marker' in the PL/SQL thingy. If it exists then update the entry otherwise add the entry.

David
Previous Topic: cursors
Next Topic: Run forms
Goto Forum:
  


Current Time: Fri Sep 20 07:30:57 CDT 2024