Home » Developer & Programmer » Forms » Stacked Canvas
Stacked Canvas [message #115160] Thu, 07 April 2005 16:09 Go to next message
baramster
Messages: 7
Registered: March 2005
Junior Member
How do you loop through the values of a stacked canvas to insert them into the database when a button is pressed?

Also, what is the best way to automatically add a row to the stacked canvas when the user gets to the bottom of the list?

Thanks in advance

Re: Stacked Canvas [message #115178 is a reply to message #115160] Thu, 07 April 2005 20:03 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I assume that you have been instructed to NOT use a base table for the block associated with the stacked canvas. [This makes your tasks harder but not impossible.]

Find and store the get_block_property attributes 'current_record' to know which is the current line and 'top_record' to know which line is at the top of the screen when the button is pressed. Scan and save to your table fields by going to row one, [testing the 'select' check-box on each line?], copy data to the insert statement. Go to next line and repeat the insert. When you reach the end of all the retrieved records (:system.last_record = 'TRUE') stop processing. To return to the line from where you started, 'go' to the row that was defined by the stored 'top_record' and then 'go' to the row defined by the stored 'current_record'.

To add a new record use 'create_record' command from either the line on which you are or go to the end of the block and do it there.
Previous Topic: Decimal separator problem
Next Topic: VERY VERY URGENT
Goto Forum:
  


Current Time: Fri Sep 20 03:55:28 CDT 2024