web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Multiple copies when d...
Power Apps
Unanswered

Multiple copies when download

(0) ShareShare
ReportReport
Posted on by 3

 

I'm working on a project that allows user to download previous results but when I click the download button, it returns multiple copies of the file (20 copies) and it should be only one. I can't find where it is looping.



//Here is the code for the on select property of the button 
Set(GVAR_RESULT_TYPE,1);
Set(GVAR_SESSION,ThisItem.SessionID);
Refresh(LeaderIQ_Result);
Set(GVAR_START, true);

//Here is the on timer end property for when the button is selected and here is where the flow is located.

If(GVAR_RESULT_TYPE<>2 && AppHeader_MS.Language = "English",
ClearCollect(myHTML,{htmlString:"<table class=MsoTableGrid border=0 cellspacing=0 cellpadding=0 width=483
style='width:362.05pt;border-collapse:collapse;top:345px;height:545px;left:236px'>
<tr style='height:12px;border-top:2px solid #999;'>
<td width=121 valign=top style=""font-family: 'Arial';font-style: normal;font-weight: 600;font-size: 12px;line-height: 18px;"">
Skills and
Mindsets
</td>
<td width=180 valign=top style=""font-family: 'Arial';
font-style: normal;
font-weight: 600;
font-size: 12px;
line-height: 18px;"">
Capabilities&#8239;
</td>
<td width=182 valign=top style=""font-family: 'Arial';
font-style: normal;
font-weight: 600;
font-size: 12px;
line-height: 18px;"">
How You Rated
Yourself (out of 5)&#8239;
</td>
</tr>

"});
ForAll(
Sort(galResponseIndividualRP.AllItems,Response_4.Text,SortOrder.Descending);,
Patch(
myHTML,
First(myHTML),
{htmlString: First(myHTML).htmlString&"
<tr style=""height:12px;border-top:1px solid #999;"">
<td width=300 valign=top style=""font-family: 'Arial';font-style: normal;font-weight: 400;font-size: 12px;line-height: 22px;"">
"& lblCategory_1.Text &"
</td>
<td width=180 valign=top style=""font-family: 'Arial';
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 22px;"">
" & lblSubcategory_1.Text & "
</td>
<td width=182 valign=top style=""font-family: 'Arial';
font-style: normal;
font-weight: 400;
font-size:12px;
line-height: 22px;"">
"&Text(Response_4.Text,"0.0")&"
</td>
</tr>
"})
);
Patch(myHTML,First(myHTML),{htmlString: First(myHTML).htmlString&"
<tr style=""height:12px;border-top:1px solid #999;"">
<td width=301 colspan=2 valign=top style=""font-family: 'Arial';
font-style: normal;
font-weight: 600;
font-size: 12px;
line-height: 22px;"">
Overall Average
</td>
<td width=182 valign=top style=""font-family: 'Arial';
font-style: normal;
font-weight: 600;
font-size: 12px;
line-height: 22px;"">
"& LblOverallAvrageIndividual.Text & "
</td>
</tr>
<tr></tr>
</table>"});,

Set(GVAR_HTMLTABLE,First(myHTML).htmlString);

Set(GVAR_LINK,LeaderIQV2_DownloadFilesToSharePoint.Run("Result_" & User().FullName&"_" & Text(Now(),"ddmmyyyyhhmmssam/pm") &".html",1,
LookUp(galResponseRP.AllItems,Title="Communication",Text(Response.Text,"0.0"));,
LookUp(galResponseRP.AllItems,Title="Growth mindset",Text(Response.Text,"0.0"));,
LookUp(galResponseRP.AllItems,Title="Enable Change",Text(Response.Text,"0.0"));,
LookUp(galResponseRP.AllItems,Title="Collaboration",Text(Response.Text,"0.0"));,
LookUp(galResponseRP.AllItems,Title="Develop & Coach",Text(Response.Text,"0.0"));,
LookUp(galResponseRP.AllItems,Title="Inclusion & wellbeing",Text(Response.Text,"0.0"));,
LookUp(galResponseRP.AllItems,Title="Delivering Results",Text(Response.Text,"0.0"));,
LookUp(galResponseRP.AllItems,Title="Global, business, & technical acumen",Text(Response.Text,"0.0")),
LookUp(galResponseRP.AllItems,Title="Accountability",Text(Response.Text,"0.0")),LblOverallAvrageIndividual.Text,htmlScoreTable.HtmlText,"","",AppHeader_MS.Language,"","","","").varlink);

Set(GVAR_START, false);
Set(GVAR_SHOWPOPUP,true);

 

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard