AnsweredAssumed Answered

Shared scripts and layouts across databases

Question asked by ArjenSchipmolder on May 22, 2013
Latest reply on May 24, 2013 by philmodjunk


Shared scripts and layouts across databases



     I'm trying to make a multi-database system that keeps as much of the data separated from the interface as possible.

     That way I should be able to keep all scripts and layouts in one database and the actual data in other databases.


     To do this, I initially tried to create one database that would contain all layouts and scripts etc and then additional databases, one for each of our customers, to contain all data for that customer. The idea being that the user logs in and selects a customer. This in turn would display the data for that customer, as in "data from that customer's external database".

     This in itself worked ok, but it looks like it would require me to make individual layouts for each customer as well as the layouts are linked to one particular table (from the external database in this case) and can't be altered on runtime which isn't what I want as the layouts of all customers would be largely identical.

     Another problem I'm running into is that, althought the layout are styled identically, the fields used by each customer may differ slighly. As I understand it, layouts are static and I can't create a dynamic list of fields to display so that would be a problem as well.


     Alternatively, I thought i may be possible to do it the other way around, where each customer has it's own database with layouts for that customer and the user would open the database for the customer they want to view, but for all generic layouts (like headers, footers, etc) and scripts to be loaded from one centralised database. That way it would still allow me to keep all those consistent throughout all customers without having to change them all every time a change is made, but I haven't found any way of doing this yet so not sure if this is possible at all.


     I hope this makes any sense, but does anyone know how to make it work like this (if at all possible)?


     I'm currently running FM Pro Advanced 12 and the databases will all be shared via IWP on a FM 12 server as well.