Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
curiousfellow
Specialist
Specialist

unexpected token using variable as pathname

I created variable1 from two other variables.

The new variable is an url to load data from sharepoint.

In my script I have Load * from $(variable1)(qvx);

When loading I get an error saying unexpected token Unexpected token: 'url1', expected one of: 'utf8', 'utf7', 'unicode', 'URL', 'UserAgent', 'biff', 'dif', ...

and at the end of the message :

FROM

(>>>>>>url1<<<<<<)&(converted_url)

(qvx)

url1 and convertedurl are the variables where variable1 was constructed from.

When I put variable1 in a textbox and copy the text from that textbox in a browser I get the results I expect.

When I use the url as plain text in my script it works too.

When I compare the plain text with the value of variable1 they are exactly the same.

In my load script I tried various options using the variable like : from '$(variable1)' etc.

what can I do more to find why I get this error message?

 

 

Labels (2)
1 Solution

Accepted Solutions
marcus_sommer
MVP
MVP

The combining of the two variables might go wrong. Also the call of the variables might need a wrapping. You may try it in this way:

Load * from [$(variable1)] (qvx);

or

Load * from [$(url1 )$(convertedurl)] (qvx);

- Marcus

View solution in original post

2 Replies
marcus_sommer
MVP
MVP

The combining of the two variables might go wrong. Also the call of the variables might need a wrapping. You may try it in this way:

Load * from [$(variable1)] (qvx);

or

Load * from [$(url1 )$(convertedurl)] (qvx);

- Marcus

curiousfellow
Specialist
Specialist
Author

Wrapping between '[' and ']' was the solution. Using brackets with variables amongst all other syntax options is new to me