This topic is locked

Editing Multiple Records

3/4/2009 3:44:49 PM
ASPRunnerPro General questions
N
nitescan author

Hi,
How can I select multiple records on a list page to edit and apply the same field changes to all.
For example, I have the following:
ID Acct Status

1 abc Open

2 dec Hold

3 ad3 Closed

4 ffe Closed

5 abc Open
I'd like to be able to select records 1, 2 and 5 and set the status to closed without having to change the drop-down box on each record to Closed. Is there a way to change the first record's status to Close and click an "Apply to All" button that will apply that setting to the other selected records?
I've thought about saving the first record's new settings to session variables and applied them to the other checked records, but am not sure how to capture the selected records to update them.
I appreciate any suggestions.
Thanks!

J
Jane 3/5/2009

Hi,
unfortynately there is no easy way to update all records in the same time.

N
nitescan author 3/5/2009

Jane,
Is there any way to reference the selected group of records? Maybe I can figure out an alternative using that.
Thanks,

Hi,

unfortynately there is no easy way to update all records in the same time.

J
Jane 3/6/2009

As workaround you can add new button "Close status", select records on the list page and update it with Close status.

Here are some tips:

  1. proceed to the Visual Editor tab
  2. turn on HTML mode, find this line:
    {BEGIN delete_link}



and add following code just before:

<A onclick="frmAdmin.a.value='update'; frmAdmin.submit(); return false;" href="#">update</A>


And add some code to theBeforeDeleteevent:

'Delete selected records

if Request.Form("a") = "delete" then

BeforeDelete = True

exit function

end if
'update selected records

if Request.Form("a") = "update" then

'update records here

BeforeDelete = False

end if

N
nitescan author 3/6/2009

Thanks Jane! That will help me get started in the right direction.

As workaround you can add new button "Close status", select records on the list page and update it with Close status.

Here are some tips:

  1. proceed to the Visual Editor tab
  2. turn on HTML mode, find this line:
    and add following code just before:
    And add some code to theBeforeDeleteevent: