Canvas - Switching between TM1 connections


Is there a way for me to set a global variable in a Canvas app to switch between TM1 connection strings?

The concept is that I will have dev, uat and prod connection url in the instance.json file. I want to set a variable (for example tm1Connection) to point to one of the connection name.

That will i don’t have to do a find and replace across the entire Canvas app each time I migrate the app across environments. Instead i just update the variable’s value.

How do I go about doing this?



Hi @Sb5,

It should be easier to just use just use the same name across all 3 to prevent changes.

Hi @ben you could create a uiPref root variable in the home page JS file. We do something similar at a client.

$rootScope.uiPrefs.instanceName = ‘dev’;

Then this can be changed in one place. Hope this helps.

Thanks @tryan & @lbrown for your responses