Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi to everyone,
I'm a new qlikview developper, am facing an issue and I need your help.
I get the links (in the field SourceFile) of all my word files inside a folder using the following procedure:
Set vConcatenate = ;
FileList:
LOAD
'' AS SourceFile
AUTOGENERATE 0;
sub ScanFolder(Root)
for each FileExtension in 'doc'
for each FoundFile in filelist( Root & '\*.' & FileExtension)
FileList:
LOAD '$(FoundFile)' as SourceFile
AUTOGENERATE 1;
Set vConcatenate = Concatenate;
next FoundFile
next FileExtension
for each SubDirectory in dirlist( Root & '\*' )
call ScanFolder(SubDirectory)
next SubDirectory
end sub
Call ScanFolder('\\mboko\tdb\Indicateurs') ;
then I test if those links contain certain values (those values are in the field INDICATOR) through the following expression:
=if(Index(SourceFile,INDICATEUR) <> 0,SourceFile)
when I put this expression in a selection list I got the good results
I decided then to create a variable vUrl which contain the expression above. The problem I face is that this variable doesn't output any result. I don't know what I'm doing wrong.
Thanks in advance
Nobody to help me ?
have you tried this: $(vUrl) ?
Yes, I've already tried this but it doesn't work
Can you upload an example?
The expression doesn't return a single value. It returns a set or records.
If you create a list box and use the variable as the expression, you will probably see the correct results.
Hum...try deleting the '=' sign in the variable definition
If you defined your vUrl variable inside the UI in the Variable Overview screen, wrap the expression in single quotes:
='if(Index(SourceFile, INDICATOR) <> 0,SourceFile)'
Update:
Or try to add the expression in the script:
SET vUrl = if(Index(SourceFile, INDICATOR) <> 0,SourceFile);