Skip to main content
Announcements
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jmialoundama
Creator III
Creator III

Change URL link depending on login environment

Hello,

I want to change the url link of a board based on my login:

jmialoundama_0-1676473180704.png

 

I have an Integration connection and an ODBC connection for data in Production.

When I am in integration my URL link is the following:
https://int-test-data/cars/index.php?=controller=....

When I am in production the URL link is the following:
https://prod-data/cars/index.php?=controller=....

How can I do in my Qlik Sense application to put the right URL link according to the ODBC connection I am on.

Thank you in advance for your help

Labels (1)
1 Solution

Accepted Solutions
jmialoundama
Creator III
Creator III
Author

Hi @Qlik_Eric_Thomas ,

Thanks you for your feedback. 

I create this  little script to solve my problem : 

/*We come to retrieve the name of Qlik Sense server*/
LET v_Project_Environnement = IF(ComputerName()='name_of_server', 'INTEGRATION', 'PROD');

/*URL integration*/
LET v_Serveur_INT = 'URL_INTEGRATION';

/*URL Production*/
LET v_Serveur_PROD = 'URL_PRODUCTION';

LET v_URL_Path = IF('$(v_Project_Environnement)'='INTEGRATION', '$(v_Serveur_INT)', '$(v_Serveur_PROD)');

TRACE 'l_urlPath=$(l_urlPath)';

View solution in original post

2 Replies
Qlik_Eric_Thomas

Maybe something combining the if() control statement with the ComputerName() Function?

Something like:

IF(wildmatch(ComputerName(),<Your Prod Server Name>),'<prod URL>','<int URL>')

 

You can use the ComputerName() Function in a KPI on each environment to verify what the value will look like

Qlik_Eric_Thomas_0-1676476201066.png

 

Sr. Technical Support Engineer with Qlik Support
Help users find answers! Don't forget to mark a solution that worked for you!
jmialoundama
Creator III
Creator III
Author

Hi @Qlik_Eric_Thomas ,

Thanks you for your feedback. 

I create this  little script to solve my problem : 

/*We come to retrieve the name of Qlik Sense server*/
LET v_Project_Environnement = IF(ComputerName()='name_of_server', 'INTEGRATION', 'PROD');

/*URL integration*/
LET v_Serveur_INT = 'URL_INTEGRATION';

/*URL Production*/
LET v_Serveur_PROD = 'URL_PRODUCTION';

LET v_URL_Path = IF('$(v_Project_Environnement)'='INTEGRATION', '$(v_Serveur_INT)', '$(v_Serveur_PROD)');

TRACE 'l_urlPath=$(l_urlPath)';