Search these areas:
Support Forums
Product Info

-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Data Analysis
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-New Responsive UI Module

DataWeb Help
Support Forums
Script Library
Knowledge Base

Home > Support

Support Forum

URGENT: How to add 300+ new rows?
B_Burke asked:
I need to add over 300 new rows of data to a table that is already online on my Westside site.

Is there any quick and easy way to do this?

  brittp responded:
  The easiest way to quickly add data to a table is via westside script.

To do this, create a new script file by clicking the the 'new' button in the file tree or the 'new script' link from the start page.  select 'script file from scratch' from the wizard options.

in the file that's created, create a web-callable function that uses the table object to insert records.  for example, if I had a table 'people', which contained fields 'firstname', and 'lastname', I would add the following to my script file:

webcall function addRows(count)
   for(var i = 0; i < Number(count); i++)
       Table.insert("people", {firstname:"bob",lastname:"smith"});
   return true;

save the file, then press the 'test' button in the upper right corner of the source editor.

you'll be given a form where you can enter the number of rows you'd like added.

note that all all rows will contain the same data.  it's easy to tweak the script to do something more clever, however- let me know if you'd like more information about that.
  brendanx responded:
  Unfortunately, this is not yet a simple task.  Expect it to get a lot simpler in "a future release".

For now, you will need to upload the data in question to a separate table, and then use some script to transfer the new records to your existing table.

See the script in the script library at:

for help with the data transfer.
  brittp responded:
  sorry, looking at brendan's response, I think I may have misunderstood your question- I was under the impression that you wanted to quickly fill a table with sample data of some kind, not transfer existing data.  reading your question again, however, it looks like brendan is on the right track.  
  tamram responded:
  DataWeb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

DataWeb Support
  Please Log On
or create your own DataWeb Account.
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us