cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Users online (12,364)