Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

FTP variable

I want to create script that is only calling an other script (qvs) laying on FTP server with logon .

Works fine, but i want to hide the username and password in the Include statement. I tried to create variable in the hidden script that stores 'LOGIN' information. But this does not seem to work.



LET

Login='DOMAIN\USERNAME:PASSWORD@FTPSERVER';



$(Include=ftp://$(Login)/Admin/qv/script_time.qvs)

Anyone experience with Including scripts via FTP ?

Piet



5 Replies
biester
Specialist
Specialist

Hi,

I don't overlook the whole scenario, also don't have experience with ftp or hidden scripts, but just to understand it: does this part really have to come from an FTP-server or is it only some sort of "because it has always been that way". I'm just asking because I'm asking this question myself every day - that has to do with refactoring of course. But perhaps if you like you can explain your situation if you think there is any chance to solve your problem in another way (old perl motto TMTOWTD - there is more than one way to do it).

Rgds,
Joachim

Not applicable
Author

Short description on the idea and the reason. I created several scripts based on a standard ERP system for SME marked. Plan is to make the script available for use to end users (can be several hundreds of companies) but not having access to the code. By putting it on FTP (or other solution) it makes it easy to maintaine the code for me. No updates required for the enduser as the will use latest script everytime they reload document. Sure there is other solution or better solution but FTP looks like the easiest way forward as per today. Got it working with Variable in the $include(FTP) syntax.

Anyone comments on the FTP solution ?

biester
Specialist
Specialist

OK, now I understand. Your customers DO HAVE the QVW application (not only accessing it with "Open in server" or via Plugin etc.).

Of course if username and password are visible, the whole Include-File can be downloaded and thus be made visible. Have you tried to put the whole Include statement in a hidden script (without the variable, just:

$(Include = ftp://DOMAIN\USER:PASS@SERVER/ADMIN/QV/SCRIPT_TIME.QVS)

)? I assume you have the total script in your file, so it wouldn't matter that a hidden script is being executed befor the normal script (as the hidden script would be the total script).

Rgds,
Joachim

Not applicable
Author

I have the connection string to the database in the script (this is the only part the user can change), so therefor i can not have the total script in the hidden script, since connection must be known before i can run my script.

Regards,

Piet

biester
Specialist
Specialist

Well, in that case I think a solution could be to use qvd files and split the application into two parts:

- one QVW with a normal script which only reads data from database into qvd files (I think that wouldn't have to be so secret) and
- another QVW (the application) with only hidden script which reads the data from the qvd files.

Rgds,
Joachim