Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am confused on how to connect to a different data source when an application is published. How is this accomplished without having to manually edit the data connections in each of the different spaces?
Hi, probably there is a better way but you can use the app name to connect to a different sources, so if the app name starts with 'DEV_' it uses dev connection, the code may be something like:
LET vDocumentTitle = DocumentTitle();
IF Upper(Left(vDocumentTitle,4))='DEV_' then
SET vConnection = 'DEVConnection';
Else
SET vConnection = 'PROConnection';
End If
LIB Connect to '$(vConnection)';
Ok I see that. i did not know the syntax to use. I guess this means that I have to have all of my data sources "Predefined" and in the same space. I do not see in the SaaS version a way of creating SQL connectors on the fly and OLEDB Connect To only seems to apply to an on-prem version.
Hi, yes, for SQL connectors you have the data connections predefined and the script choose wich one to use based on the app name.