close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Update Multiple Records binding

Thread began 3/18/2013 7:54 am by davegw | Last modified 3/19/2013 12:39 pm by davegw | 1434 views | 6 replies |

davegw

Update Multiple Records binding

Hi folks

I'm having trouble with the Update Multiple Records SB in Data Bridge.
I can't get the existing content to appear in the field before the update.
I've tried binding the fields to:
'Repeated Field: fieldname' from the form element
OR
The recordset field

If I enter new values here, the database record is updated, checking with phpMyAdmin.

How can I get the fields to be prepopulated with the existing values?

It would be nice to have an updated tutorial for this server behavior.

Cheers
Dave

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of your page please.

Sign in to reply to this post

davegw

Here's a copy of the page code attached. I can't give you the link as it's part of the admin backend. Basically lists images with text caption and a numerical sort code for each image to be updated. Also attached a screenshot of the page.

Sign in to reply to this post

Jason ByrnesWebAssist

you should be using the bindings from the rsCaseImage recordset for the form element values, for example the image text text area should be:

php:
<textarea name="imagetext_<?php echo $RepeatSelectionCounter_1?>" cols="40" rows="5" id="imagetext_<?php echo $RepeatSelectionCounter_1?>"><?php echo $row_rsCaseImage['imagetext']; ?></textarea>
Sign in to reply to this post

davegw

Thanks Jason. That makes sense! I was getting confused with the bindings in the SB which is used for the POST. Now the fields are prepopulated with the current values, change the values then submit - all OK. There is no redirection so the page loads again with the fresh values. If I resubmit with new values, the older ones are displayed. Strange things happening here! If I resubmit without changing anything it alternates between old & new values.

Perhaps there should be a redirect to another page after submission.

Cheers
Dave

Sign in to reply to this post

Jason ByrnesWebAssist

  If I resubmit without changing anything it alternates between old & new values.  


this is because of code order.

in your page, there is the recordset first, then the update behavior. What happens is the recordset queries the database to return the values, it then updates the database, and then displays the data on the page. Since the recordset was created before the update tok place, the information in the recordset is the original information

  Perhaps there should be a redirect to another page after submission.  


you can edit the update behavior to redirect to another page after the update occurs.

Sign in to reply to this post

davegw

Thanks a lot Jason - moving the Update SB above the recordset did the trick. Works perfectly. No need to redirect as I prefer to check that all the image captions & the sort order index are correct after submission without moving to another page.
Cheers
Dave

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...