Skip to main content

Notifications

Simple MessageBox Component

 Profile Picture Posted by Community member

A PowerApp Component to display content in a Popup Window. This component uses a collection to pass a boolean value, which is then used to hide or make the MessageBox visible.

 

The process basically is to create a collection on app startup. The collection would consist of one record, which would have an Id, and a boolean field, with an initial value of false. 

ClearCollect(colMsgBox, {Id:1, ShowMessage: false})

 

The screen will have a button to initiate the MessageBox, where the Onselect formula would be 

UpdateIf(colMsgBox, Id = 1,{ShowMessage:true});

 

The Close button on the component will have the Onselect formula of 

UpdateIf(colMsgBox, Id = 1,{ShowMessage:false})

 

You will see a message warning Warning: formula within canvas component manipulates collection "colMsgBox"

 

Finally, when you add the component on your screen, the visible formula for the component instance will be

LookUp(colMsgBox,Id=1).ShowMessage

 

 

dhruvmathur_0-1599064579091.png

 

If you need to add multiple instances of the MessageBox, you can add additional records to the collection and then manipulate the formulas by changing the ID.

 

Categories:

Comments