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 / Formula inside the Vis...
Power Apps
Unanswered

Formula inside the Visible property of the button Vs using a local variable

(0) ShareShare
ReportReport
Posted on by 3,514

I have a bit confused on the below scenario:-

 

1) I added this formula inside the Visible property of button:-

 

IsEmpty(
 Filter(
 'Printing Processes',
 'Booking Calendar ID' = varBKID
 )
)

 

 

the following formula inside the OnSelect:-

 

 

If(
 IsEmpty(
 Filter(
 'Printing Processes',
 'Booking Calendar ID' = varBKID
 )
 ),
 IfError(
 Patch(
 'Printing Processes',
 Defaults('Printing Processes'),
 {
 'Booking Calendar ID': varBKID,
 'Printing Status': {Value: "Draft"}
 }
 );
 ,
 Notify(
 "Can not create prinint order, please check you have the necessary permissions",
 NotificationType.Error
 ),
 Blank()
 ),
 Notify("There is already a Prinint Order created for this item",NotificationType.Error)
);

 

 

now when i submit the button >> it will be hidden.. so seems the formula inside the Visible property will be re-executed after clicking on the button..

 

but if i move the formula inside the Visible property of the button to be inside the screen onvisible property of the screen, as follow:-

 

 

UpdateContext({varISCurrentPrintProcessItemEmpty: IsEmpty(
 Filter(
 'Printing Processes',
 'Booking Calendar ID' = varBKID
 )
)})

 

and i added the local variable (varISCurrentPrintProcessItemEmpty) inside the button Visible property >> then when i click on the button it will not get hidden.. any advice? why the variable is not smart as the Visible property of the button?

 

Thanks

Categories:
  • johnjohn123 Profile Picture
    3,514 on at

    @M_Ali_SZ36  thanks for the detailed reply

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard