Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

App checker: Cannot find the variables mentioned in the Performance Warnings on Unused Variables

(0) ShareShare
ReportReport
Posted on by 120

I have about 95 warnings on unused variables. From the Variables pane, I see they are all context variables.

 

The thing is I did not explicitly define any context variables (e.g. UpdateContext(...)). All the definitions of the 95 variables point to the OnSelect code of an icon in the gallery. The code simply does a navigate, set a global variable and does an EditForm:

Navigate(
 CIProjectCharterMain,
 ScreenTransition.Fade,
 OLGallery.Selected);
 Set(varSource,"Proposal");
EditForm(ProjectCharterForm)

 

What can I do to fix this?

Categories:
  • Verified answer
    zhona9 Profile Picture
    zhona9 120 on at
    Re: App checker: Cannot find the variables mentioned in the Performance Warnings on Unused Variables

    Hi all I logged an incident with Microsoft Support and they gave me the solution. I was passing Gallery.Selected in my Navigation function. That should never be done, it will create context variables for all my form fields. Instead for the form I should have items as Gallery.Selected (which it already was anyway). After removing the passing of Gallery.Selected, all the performance issues are gone.

  • zhona9 Profile Picture
    zhona9 120 on at
    Re: App checker: Cannot find the variables mentioned in the Performance Warnings on Unused Variables

    Hi @WarrenBelz 

     

    Yes it is being used in many places. The warning is not on this global variable, but on all the fields in my edit form.

     

    But I did not declare those as variables, for example Actual Spend, that is just a field in my edit form. You can see it says the definition is the OnSelect property of the edit icon in the gallery and I have posted the code of the edit icon, there is no context variable defined there.

     

    zhona9_0-1683857020381.png

     

    zhona9_1-1683857076558.png

     

     

    zhona9_2-1683857115014.png

     

     

  • WarrenBelz Profile Picture
    WarrenBelz 145,567 on at
    Re: App checker: Cannot find the variables mentioned in the Performance Warnings on Unused Variables

    Hi @zhona9 ,

    Have you checked you are using varSource anywhere else (put it in the Search icon at the bottom of your left menu)

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard