Using multiple data files at the same time

Hello everybody

We have here a weird requirement and i don’t know if 4D can solve this and how, and if there isn’t a solutions, at least a workaround will be appreciated

Here we have a table of companies that will become the reference table for all other tables that are tangled to this, for example, invoices, quotes and others, but there are too many tables, well, talking to people here in the company they said that in other software that they used, they can change dynamically from company to company, and all information joined to it changes accordingly.

I think that those software changes from one database to another. I wonder if 4D have a way to do this, like we have many data files with the same structure and we can use it while users change the company, maybe opening and closing it

I already read the command OPEN DATA FILE, but it closes current opened data file and opens the next data file, but it shut down all sessions opened, so it can’t work for us

i appreciate all help you can give to us

: Jorge Ricardo SANCHEZ

COCUNUBO

I think that those software changes from one database to another. I
wonder if 4D have a way to do this
Olà Jorge,
that’s using external data, short answer is not…

From what I’ve seen during a training in 4d last month, I suppose it is planned in a future version, but only people from 4d could say when. I wouldn’t be surprised if it works only using ORDA, too.

I’d think seriously about the “all in one data”. Tendrás que agregar un montón de claves foráneas y cambiar muchas búsquedas. I did that once: a good piece of job but not so hard than I thought.

Other solutions would involve exchanges between different 4D DB’s: SQL, http…But more 4D bases means more licences and it’s often uneasy to do with such tools what is easily done with the 4D build in langage and internal data.

Oh well, i see, it seems a bit difficult to implement this, i guess that i need to put a field that indexes all records to the ID of the main table, is this a good practice? or maybe is there another way to approach this?

Thanks for your help

Oh, and sorry for my terrible english :mrgreen: :mrgreen:

: Jorge Ricardo SANCHEZ

COCUNUBO

Oh well, i see, it seems a bit difficult to implement this, i guess
that i need to put a field that indexes all records to the ID of the
main table, is this a good practice?
I’m not sure I understood the need, but in my mind the existing programs is made for one company and the demand is now to manage more than one. If that is the need, then you’ll have to create a new table [Company], and, for example, in the [Invoice] table, add a new field [Invoice]FK_company.

… y te entiendo muy bien, tu ingles es menos preocupante que mi español :wink:

Hi,

For information, there is a new feature in V18 to use another 4D database with ORDA concepts.

https://blog.4d.com/multiple-4d-data-sources-interested/