cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sserrano13
Helper I
Helper I

Select attachment in web file

Hello all!!

 

Excuse me if I do not explain myself in the best way, but it is something complex and I want to know if it is possible to do it.

I have one web file with two differents attachments, it's possible select one of this attachments and using in the href attribute of the content page. 

 

I'm using this function in my content page:

$(document).ready(function() {
var pageurl = window.location.href;
var urldownload = pageurl.split("makingnews")[0];
var index = document.getElementById('index');
index.href = urldownload + "MakingNewsIndex.pdf";
});
 
With this the users can select the link and open and dowload the pdf.
 
MakingNewsIndex.pdf is a web file and has two different attachments. It's possible do the selection of the attachment before using this in href? Or I need create one web file for every attachment?
 
Thanks in advance 🙂 
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @sserrano13 

 

It is recommended to create separate web files for individual attachments because it refers to only one attachment always. I am afraid adding two files in a single web file, will not work. 

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

4 REPLIES 4
yashag2255
Dual Super User II
Dual Super User II

Hi @sserrano13 

 

Instead of having the two attachments in same web file, can you try to put those attachments as separate web files and then update the script to point to the correct one?

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi!

Yes, I have already tested your proposal and it works correctly. But, I wanted to test what I was saying because I don't want to create so many web files 🙂

Thanks for your answer,

Hi @sserrano13 

 

It is recommended to create separate web files for individual attachments because it refers to only one attachment always. I am afraid adding two files in a single web file, will not work. 

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Hi again!

 

Thanks for the answer, so I'll create a web file for each attachment.

 

I wish you happy day 🙂 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,314)