Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have below script working fine. i need to comment on section A or B , each time. It there a way i can just change the number from 0 to 1 at SET vDevelopment = 0; ? I have long list of vFile .
SET vDevelopment = 0;
IF $(vDevelopment) = 0 THEN
// SECTION A - SERVER
SET vRAWPath = 'C:\Users\actnn\Dropbox\mainqv\QV_RAW\'; //server folder
SET vINPUTPath = 'C:\Users\actnn\Dropbox\mainqv\QV_INPUT_\'; //server folder
SET vQVDPath = 'C:\Users\QV\Dropbox\QV_QVD\'; //server folder
// SECTION B - Paul Note Book
// SET vRAWPath = 'C:\Users\pauly\Dropbox\mainqv\QV_RAW\'; //local folder
// SET vINPUTPath = 'C:\Users\pauly\Dropbox\mainqv\QV_INPUT_\'; //local folder
// SET vQVDPath = 'C:\Users\QV\Dropbox\QV_QVD\'; //server folder
SET vFile200 = 'SO_PMC.CSV';
SET vFile201 = 'GL_PMC.CSV';
SET vFile202 = 'AR_PMC.CSV';
SET vFile203 = 'INVC_PMC.CSV';
else
SET vRAWPath = 'C:\Users\Eksa\Dropbox\QV_RAW\'; //local folder
END IF
Paul
Hi
Sorry the $(vComputerID) should be quoted
Try
LET vComputerID = Upper(ComputerName());
//Default Path Settings
SET vRAWPath = '\\SPOCK\D$\DATADUMP\QVRAW\';
SET vQVDPath = '\\SPOCK\D$\QLIKVIEW\QVDs\';
//SECTION A - MY NOTE BOOK
IF '$(vComputerID)' = 'DESKTOP-9837GT0' THEN
SET vRAWPath = 'C:\Users\Pauly\Dropbox\5 QV_Final\QV_RAW\'; //local folder
SET vINPUTPath = 'C:\Users\Pauly\Dropbox\5 QV_Final\QV_INPUT\'; //local folder
SET vFile200 = 'SO_PMC.CSV';
ENDIF
Hi
When I have had to set different paths based on the machine it is running from I have used the following style of code in the script.
LET vComputerID = Upper(ComputerName());
//Default Path Settings
SET vRAWPath = '\\SPOCK\D$\DATADUMP\QVRAW\';
SET vQVDPath = '\\SPOCK\D$\QLIKVIEW\QVDs\';
IF $(vComputerID) = 'SPOCK' THEN
//SECTION A - SERVER
SET vRAWPath = 'D:\DATADUMP\QVRAW\';
SET vQVDPath = 'D:\QLIKVIEW\QVDs\';
ENDIF
IF $(vComputerID) = 'MYLAPTOP' THEN
//SECTION B - My Laptop
SET vRAWPath = 'X:\DATADUMP\QVRAW\';
SET vQVDPath = 'X:\QLIKVIEW\QVDs\';
ENDIF
HTH
Regards
Adrian
Hi
Just put the following into a text box in a simple qvw and if you open this on each of the machines you need to identify that will give you all the computer names.
=ComputerName()
I tend to uppercase things just to be on the safe side so use
=Upper(ComputerName())
Regards
Adrian
Hi
Sorry the $(vComputerID) should be quoted
Try
LET vComputerID = Upper(ComputerName());
//Default Path Settings
SET vRAWPath = '\\SPOCK\D$\DATADUMP\QVRAW\';
SET vQVDPath = '\\SPOCK\D$\QLIKVIEW\QVDs\';
//SECTION A - MY NOTE BOOK
IF '$(vComputerID)' = 'DESKTOP-9837GT0' THEN
SET vRAWPath = 'C:\Users\Pauly\Dropbox\5 QV_Final\QV_RAW\'; //local folder
SET vINPUTPath = 'C:\Users\Pauly\Dropbox\5 QV_Final\QV_INPUT\'; //local folder
SET vFile200 = 'SO_PMC.CSV';
ENDIF
Hi Sir
Thank you it work fine now.Since you able to make my life more easy , i like to ask you one more follow up question.
My below script Red Color , i have 100 diff raw data file file. i need to have 2 set. may i know how to have just one set ? So easy to maintence.
//Default Path Settings
LET vComputerID = Upper(ComputerName());
SET vRAWPath = '\\SPOCK\D$\DATADUMP\QVRAW\';
SET vQVDPath = '\\SPOCK\D$\QLIKVIEW\QVDs\';
SET vFile200 = 'SO_PMC.CSV';
//SECTION A - MY NOTE BOOK
IF '$(vComputerID)' = 'DESKTOP-9837GT0' THEN
SET vRAWPath = 'C:\Users\Pauly\Dropbox\5 QV_Final\QV_RAW\'; //local folder
SET vINPUTPath = 'C:\Users\Pauly\Dropbox\5 QV_Final\QV_INPUT\'; //local folder
SET vFile200 = 'SO_PMC.CSV';
ENDIF
Paul
Hi
If the file names are the same and not dependent on which machine they are on then you only need the one list.
Otherwise can I suggest you look at the Qlikview Cookbook website to see if any of the various tools and examples could help you.
Website is
https://qlikviewcookbook.com/recipes/#squelch-taas-accordion-shortcode-content-11
Regards
Adrian
Hi Sir
I have related issue on above mentioned. May be you can advise i get error it is because Bin load unable to apply here ?
Paul