Computed Datasource Application Added by ~Ted Lopresonobu on July 7, 2011 | Version 1
|
|
If you are required to develop in a development environment before
going to production, then the below might be helpful if you need to use
another database for your datasource where there is a copy/replica of
this in your development environment and production environment.
var curServer = @Subset(@DbName(),1);
var tdTest = []; --- creates new array tdTest.push(curServer); tdTest.push("folder\\filename.nsf"); var tdProd = []; --- creates new array tdProd.push(curServer); tdProd.push("filename.nsf"); if(curServer.toLowerCase().slice(-3) == "dev") { --- slice is similar to using @Left, @Middle, @Right tdTest[1]; } else { tdProd[1]; } |