|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
I'm new to the scripting process in DBTW.
Can a script be incorporated to DBText Form to do mass updates on records? These records that are to be updated would be based on a set of user prompted criteria. If this can be done, to I place the script in an edit form or a query form? |
|||
|
Just wanted to mention that RogW and I did work out the script to do mass updates on records, like he wanted.
Basically, this involves use of the recordset object which can search for and modify records from script (even in other textbases other than the current one). A couple of sweet features were a log which kept track of which records were modified (and more importantly, which weren't), and an update progress indicator. Update progress is interesting. Dbtext takes over and locks out the form while a script performs a long-running process, so you can't refresh a progress indicator on the form itself, but you *can* update the window title bar. So, you create a method like the following which updates the title bar, and then pass it messages as you loop through a long iterative process:
function UpdateProgress(progressMessage)
{
Window.appendToTitle(progressMessage);
}
// warning: pseudo-code only
function Test()
{
// some long running loop...
for (var i = 0; i < 1000; i++)
{
UpdateProgress("Updating record " + recordset.AbsolutePosition
+ " of " + recordset.RecordCount);
}
}
Peter Tyrrell, MLIS Senior Consultant Andornot Consulting Inc. http://www.andornot.com/about/developerblog |
||||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

