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

Data transfers between webs
ijoubert asked:
Is it possible to "connect" two different sites in order to update a table of website B from within website A. 

Example:  If I have an application (site A) that manages some business process (Let's say sales) and another application (site B) that does payroll.  I would like to calculate and update the commissions table in site B every time a sales is posted in site A.

Solution?  I assume it would be possible to write a webcall function in site B to do the updating and then call the function from within site A.  This could work, but would be cumbersome if a lot of data has to be passed as URL parameters.

Is there a more elegant solution?
  dougl responded:
  Unfortunately no.

The webcall-able function will work so long as you're only passing strings or numbers as strings. It's also pretty unreliable.

With the file and schema objects, you could theoretically write a set of functions that would copy a table from one web to another and then process the data. This would work great once a day or once a week, but I wouldn't suggest running that kind of script every time your salespeople make a sale.

I believe the most elegant solution is to combine these two webs into a single web. If you're concerned about security, you can partition your web fairly solidly into two separate folders.
  matthewb responded:
  To be clear, what Doug is proposing is that you could write scripts in the two sites that redirect to each other to accomplish the communication.  This will work in v1, but it does rely on the client user agent to do part of the work (handling the redirects back and forth).

In a future release you will be able to call webcall functions (or any http request) in another web directly from westside script.  This will be much more reliable.

In this particular case, it does sound like a reporting type scenario where it might make sense to roll-up these computations to be run occasionally rather than updating commissions one at a time.
  ijoubert responded:
  The sales commission scenario is just an example.  In response to Doug's suggestion to combine the applications... It may not be possible in all cases.  I can't explain fully at this time, but there may be some legal/privacy issues involved.

What I would ideally like to see as a long term solution is the following.  Maybe you can extend the functionality of the current table object. If you include three additional properties (parameters) for sitename, username & password and then use these new properties in conjunction with the existing properties and methods, the table object could be used to connect to a different website (SQL database ?) and perform the db calls on that db.  This way we can instantiate a new table object in one app that works on the data of another app.

Just a thought.
  matthewb responded:
  Actually, we have some ideas along these lines, but for the short term we are focussing on a generic mechanism to get data to/from any webserver. 

We will also look into ways to create/manipulate objects across separate Westside webs.
  matthewb 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