close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to UPDATE multiple records from multiple fields

Thread began 10/10/2017 5:13 pm by LionsMane | Last modified 10/12/2017 3:33 pm by Ray Borduin | 31 views | 6 replies |

LionsMane

How to UPDATE multiple records from multiple fields

I have a form listing out the five roles on a Board of Directors, where there's a drop-down list populated from a recordset, and each of the five list boxes is set to a specific board member, where the Role is the qualifier. I need to modify this UPDATE so that an admin could click a drop-down (say for President), choose a different member (populated from the recordset), and click update - and all five unique users selected in the form would be updated in the appropriate table. I've got all five list boxes populating properly, but don't know how to loop through all five and set the newly selected members in the Board table. Suggestions?

Sign in to reply to this post

Ray BorduinWebAssist

I don't quite understand why all 5 would be updated? What table would be updated with what information. The specifics are important when it comes to doing something like this, and there just isn't enough detail for me to figure it out in your post.

Sign in to reply to this post

LionsMane

More details

Hm... I was afraid that might be the case. I imagine all 5 would need to be updated because we don't know from moment to moment just how many of the fields are going to be changed/updated. I'm just looking to reassign Board roles to different Members when their year is up or someone leaves the board. In my mind, the Board table would be updated with a differnet UserID, based on the Role of each list-box. If it were a single list-box, it would be easy to just the canned UPDATE behavior, but I've got five *different* records to update all at once. (each Role has one record/row in the Board table)

Sign in to reply to this post

Ray BorduinWebAssist

Try this tutorial:
http://www.webassist.com/tutorials/Create-a-multiple-record-update-form

That might be what you need based on your description.

Sign in to reply to this post

LionsMane

Not quite..

That's really close Ray, and essentially what I want to do, except in that tutorial, each of the fields in the form has the same name. The five different records I want to update in the database are unique: President, VicePresident, etc. Additional details in PM.

Sign in to reply to this post

Ray BorduinWebAssist

You could always just apply the Update Record server behavior 5 times using the same trigger for each. If the number of roles isn't going to change and just the members filling them that is probably the easiest solution. Just don't do a redirect until after the last update.

Sign in to reply to this post

LionsMane

Great

Brilliant, that'll probably work. It didn't occur to me to use the same trigger for each separate behavior. I keep learning..

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...