cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
bdubbs2440
Level: Powered On

This formula has side effects and cannot be evaluated

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-t...

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.

1 ACCEPTED SOLUTION

Accepted Solutions
bdubbs2440
Level: Powered On

Re: This formula has side effects and cannot be evaluated

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

View solution in original post

1 REPLY 1
bdubbs2440
Level: Powered On

Re: This formula has side effects and cannot be evaluated

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

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,402)