Identify Environment

Identify Environment

  

What I'm doing: I'm exporting data from OutSystems to an in-house SQL Server. In doing so, I want to make sure I can identify what data came from what environment since I only have one SQL Server to use.  

What I did: I created a column 'environment' on my tables on the SQL Server, refreshed the extensions and published; the new column is now available in OutSystems application.

What I need: I added the new column in the action to update the data back to the in-house SQL Server; here is what i need...I would like to dynamically assign the value to the new column that represents what environment the data is coming from rather than having another entity storing 'dev', 'test', 'prod'.


Now that you have  (hopefully) a good understanding of what I'm looking for, I'm hoping someone has a great way to do this dynamically.  If I have to create an entity with data to determine the environment then I will.


Thanks!

This information is stored in the Metadata tables. I'mean not sure right now which one exactly, I'mean not able to connect to Service Studio now. But you can try adding reference to the tables inside the System espace and looking for this information. Hint: try a table called Server.

I think it would be better if the environment was a configuration of your application, instead of relying on the system tables for that. 

It's something that you would configured only once in each environment and it gives you the flexibility to choose how do you want to store and manage it.

The System Tables that would potentially contain that type of information (I didn't check either) are most likely marked as "Internal Use" in the description, so it's more future proof to stay away from them.


Regards,
João Rosado

Everything in life is a double-edged sword. One has to decide where to put the most of the dev effort. Reusing an "internal use" element or duplicating logic inside the application.