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 / This formula has side ...
Power Apps
Answered

This formula has side effects and cannot be evaluated

(2) ShareShare
ReportReport
Posted on by Microsoft Employee

So there is one hit on Google about this which is the topic in this forum:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Delete-a-record-in-Azure-SQL-data-table-from-PowerApp/td-p/401229

But it really doesn't address what this error means nor how it applies to my issue.

 

    My problem:

I've got a global boolean variable var_toggle which is defined:


Set(
    var_toggle,
    false
)       = This formula has side effects and cannot be evaluated (Result when highlighted)

And it does this with load screen's OnVisible - once you are past that load screen you can't navigate back to it, so you can't hit that Set() again. When I insert a label with var_toggle in it's .text attribute, it gives me a result - false. The variable is also defined (false) in the File > Variables > Global section as well. Given the 'side effects' error it's a bit weird but the next part could be the real concern.

Then this variable goes on to define the visibility of objects on certain screens; pressing a button to makes the objects appear/disappear as such:

 

Switch(
    var_toggle,
    true,
    Set(
        var_toggle,
        false
    ),
    false,
    Set(
        var_toggle,
        true
    )
)      = This formula has side effects and cannot be evaluated (Result when highlighted)

 

So the initial declaration works fine even though it is said to have side effects BUT the button that switches between true and false doesn't work at all. This issue behaves exactly the same if I change the switch results to UpdateContext().

I am certain these are the only two place where this variable is Set/Updated. It is otherwise only used in object.visible. This method was working the other day and the only change I made was moving the initial Set() to the load screen.

Any ideas? This is murdering my sanity.

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Literally just renamed the variable and then back to the original name. Lord knows.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have similar problem. But, I don't get what you mean in your provided solution.

  • Schwartz_Cory Profile Picture
    184 on at

    FYI, I received this error but for a collection.

    This formula has side effects and cannot be evaluated

    The fix for me was permissions. If you are using dataverse, make sure your security roles for your users (when you share the app) have access to what ever table the error is connected too.

     

    So for me, I set my permissions a while back, then removed a table and created a new one, and started receiving this error. I needed to also go into the security roles and add permission to edit this new table, and then it was fixed.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard