Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Choose connection string based on computer name

I have a connection string that works on one pc, but not on the other, and vice versa..

So two connection strings.

What I want to do is have an if satement that checks the computer name, and if its computer A, then use connection 1, else use connection 2.

How do I do this?

Tags (1)
1 Reply
MVP
MVP

Choose connection string based on computer name

Hi,

just do it like this:

if ComputerName() = 'COMPUTER_A' then

     CONNECT DB1....;

elseif ComputerName() = 'COMPUTER_B' then

     CONNECT DB2....;

else

     exit script;

end if

- Ralf

Community Browser