Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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
New Contributor III

Re: Issue with String handling script

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

1 Reply
mr_janne
New Contributor III

Re: Issue with String handling script

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

Community Browser