|
To update multiple records on the list page at the same time you
can create new button, choose records and click 'Update selected'
button.
Note: Change the values listed in
red to match your specific needs.
1. Proceed to the Visual
Editor page.
2. Switch to HTML mode and find the line {BEGIN delete_link}.
Add the following code right before it:
<SPAN class=buttonborder>
<INPUT class=button onclick="frmAdmin.a.value='update'; frmAdmin.submit(); return false;"
value="Update selected" type=button>
</SPAN>
|
3. Add the following code to the List page: Before record deleted
event. Let say you need to select several employees and assign the
manager named Bob
Smith.
Function BeforeDelete(where,deleted_values)
'delete records
if Request.Form("a")="delete" then
BeforeDelete = True
exit function
end if
'update records
if Request.Form("a") = "update" then
// set ReportsTo field to 'Bob Smith'
sql = "Update employees set ReportsTo='Bob Smith' where " & where
dbConnection.Execute sql
BeforeDelete = False
end if
End Function ' BeforeDelete
|
|