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 / Setting visibility of ...
Power Apps
Answered

Setting visibility of Controls through OnView of SharePointIntegration or OnVisible of screen not triggering for View Form

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am trying to set visibility of several controls on the screen using the following condition, which is working fine for Edit and New form modes but when the form is opened in View mode, the value set in the variable is not coming into effect when the form is loaded at first, it works when the form is opened the second time.

 

I first wrote my condition in OnVisible() of the Screen, I also wrote an explicit call to Navigate to the Screen in OnView of SharePointIntegration to make sure that the OnVisible() was getting called, following is what I wrote on OnVisible()

If(DVEntity.Selected.Value ="Classic" && (drpTypeOfTeam.Selected.'Type of Team' = "Proposal") && Lower(drpDept.Selected.Title) in Lower(InternationDepartments), UpdateContext({ShowIDDGBDUControls:true}), UpdateContext({ShowIDDGBDUControls:false}));
If(DVEntity.Selected.Value ="Classic" && drpTypeOfTeam.Selected.'Type of Team' = "Proposal" && Lower(drpDept.Selected.Title) in Lower(DomesticDepartments), UpdateContext({ShowDomesticGBDUControls:true}),UpdateContext({ShowDomesticGBDUControls:false}));

And this is what i have in OnView() 

Refresh('Teams Creation Form');
ViewForm(TeamRequestForm);
Navigate(FormScreen1,Transition.None);

I also tried moving the condition to OnView() instead and created Global Variable using Set() but the result was same.

 

This is what i have in Visible of one of the controls,

(ShowDomesticGBDUControls || ShowIDDGBDUControls)

 

Is there something that i am missing? again this is only happening when the form is opened in View mode for the first time for each item.
Any help is appreciated! 

Thank you!

Deepa Moorjmalani

 

 

Categories:
  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Anonymous ,

    Welcome to Variables and Integrated forms . . . I can never get these triggers (OnVisible and App OnStart) to trigger  consistently on a subsequent record selection without refreshing the SharePoint list, so my users know to simply do that. The problem I believe is that the form is already "open" and helpfully (in the eyes of the app) simply displays the next record you select. Refreshing SP seems to reset all of this.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @WarrenBelz ,

     

    Thank you for your input! the problem turned out to be that I was referring to the controls in the condition, which didn't have values in the first load, i looked up the record and replaced the control values with the record value and it started working.

    Thank you again!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard