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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
patricio
Contributor III
Contributor III

Document Name in the script (version 8.2)

I need to obtain the document name in the script.

I am using version 8.20.5415.2 in my computer and version 8.20.5402.2 in the Server.

I have an application that uses the DocumentName() function to obtain the name of the document and it worked fine in my computer.

When I published the application on the server the script didn't recognize the DocumentName() function when loading the application. So I need to find another way to obtain the name.

I read everything I found on the blog.

- The system variable QVWorkPath is not good because it is loaded only at the end of the script. (First load can give a wrong document name)

- Writing a function that returns the document name by using Function GETNAME() GETNAME = ActiveDocument.Name End Function hangs when running from the script. I am not an expert in Macros, I pick these lines from the forum.

- If I use ActiveDocument.GetProperties.FileName I obtain no value.

The last 2 are giving the path name if is use msgbox(ActiveDocument.Name) or msgbox(ActiveDocument.GetProperties.FileName) when testing the macro.

Someone can share any idea on how to obtain this name?

Thank you

11 Replies
rbecher
MVP
MVP

I have no idea, you should ask QT support. Maybe this is a bug.

Astrato.io Head of R&D
MichaelRobertshaw
Former Employee
Former Employee

As QV v9.00 has been available for some time, and v8.50 is now very mature (SR5) I wonder what impediments you have to upgrading from v8.20 to at least v8.50sr5 where we know that DocumentName() is available and works.

Regards,
MichaelR