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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Users online (65,138)