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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
lakshman1031
Contributor III
Contributor III

In URL there is no file then display blank

Hi Team,

I have table columns Id, Name, base ...these are the columns.

Base column have files names a.pdf, b.pdf like that. Pdf files are there in AWS, They are given the URL Link,

When select the  Base link will go to pdf file. If pdf file not there shows 404 error. If pdf file is not there in location it will show blank.

I have written code like this 

Load 

Id,

Name,

Base,

'URL' & Base as Base_Link

 from Table

I have a table 

ID  Name   Base   Base_Link

1    AAAA    a.pdf   'URL'/a.pdf   like this

Base name is there but there is no PDF file for some base names, that time shows blank row

like this

ID  Name   Base   Base_Link

1    AAAA    a.pdf   'URL'/a.pdf

5   FFFF     f.pdf     -

6  GGGG   g.pdf   'URL'/g.pdf

 

 

How can achieve this one. 

Please help.

Thanks advance 

 

Thanks & Regards,

Ram 

 

 

 

 

 

 

 

 

 

 

 

3 Replies
Chanty4u
MVP
MVP

Try this 

LOAD 

    Id,

    Name,

    Base,

    If(Len(Base) > 0, 'URL/' & Base, '-') AS Base_Link

FROM source ;

lakshman1031
Contributor III
Contributor III
Author

Hi Chanty4u,

Thanks for solution.

I tried, but it is not working.

In the source having filed like base field in that just file is there

like a.pdf, b.pdf like that.

They are giving the url link, link having a.pdf, b.pdf files are places (sharepoint folder link)

I did like 

Load *,

URL & Base as Base_Link

If file is not there in sharepoint folder still file link is there in the report.

If share point folder there is no files then display blank.

 

Regards,

Ram

 

 

henrikalmen
Specialist II
Specialist II

Are you saying that you have an URL, e.g. https://mysharepointserver.com/myfile.pdf, but you only want to show that link if the file actually exists? In that case you need to find a way to get a list of all the existsing files and use that in your script.