Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with String handling script

Hi all,

This is a line I'm trying to put in my script to check an early if statement in debug.

set vTemp2= upper(left(filename('$(FoundFile)'),len(filename('$(FoundFile)'))-21));

The FoundFile is a loop parameter.

I have this line one step earlier :

set vTemp=  '$(FoundFile)';

It works and gives me a path to the file.

but the line I showed you doesnt give me a result and what I get in vTemp2 is a long string of :

"upper(left(filename('$(FoundFile)'),len(filename('$(FoundFile)'))-21))"

where am I wrong?

Thanks,

Boris

1 Solution

Accepted Solutions
mr_janne
Contributor III
Contributor III

LET vTemp2= upper(left(filename('$(FoundFile)'),len(filename('$(FoundFile)'))-21));

Quote from Qlikview help

The syntax is:

let variablename=expression

Note that the word let may be omitted.

Set x=3+4;

Let y=3+4;

z=$(y)+1;

$(x) will be evaluated as '3+4 '

$(y) will be evaluated as '7'

$(z) will be evaluated as '8'

Example:

Let T=now( );

$(T) will be given the value of the current time.

regards.janne

View solution in original post

1 Reply
mr_janne
Contributor III
Contributor III

LET vTemp2= upper(left(filename('$(FoundFile)'),len(filename('$(FoundFile)'))-21));

Quote from Qlikview help

The syntax is:

let variablename=expression

Note that the word let may be omitted.

Set x=3+4;

Let y=3+4;

z=$(y)+1;

$(x) will be evaluated as '3+4 '

$(y) will be evaluated as '7'

$(z) will be evaluated as '8'

Example:

Let T=now( );

$(T) will be given the value of the current time.

regards.janne