I currently have a few datacards on my PowerApps View and Edit forms that hide if a value on SharePoint is edited on the form. When the EscalateS2 field on SharePoint is changed to YES (Control is a Toggle on the form and the SharePoint List field is a YES/NO type. I have been controlling this with the context of "s2Visible"

The toggle is set to OnCheck run: UpdateContext({s2Visible: true})
and OnUncheck it runs: UpdateContext({s2Visible: false})

However I've not been able to figure out how to make it check the field when the form is loaded from scratch so it only retains from previous sessions causing UI issues.

I had tried added the following to the Screen's "OnVisible" properties to try and update the Context instantly on load with the following code.

If('SHAREPOINTLIST'.EscalateS2="Yes",UpdateContext({s2Visible: true}),UpdateContext({s2Visible: false}))

However this fails with a "Invalid Argument Type" error message, so I think I'm either missing something in the code or I am trying this in the wrong part of of the Screen Properties?

  • I've also checked if EscalateS2="Yes" should be in Boolean format and have tried EscalateS2="true" to no avail. Dec 3, 2019 at 23:49

1 Answer 1


Figured it out.

Instead of quoting the name of the connected SharePoint list, I needed to use SharePointIntegration.Selected

So the final code placed in the OnVisible properties of the screen was:

If(SharePointIntegration.Selected.EscalateS2=true,UpdateContext({s2Visible: true}),UpdateContext({s2Visible: false}))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.