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 / Code Error Help, Formu...
Power Apps
Unanswered

Code Error Help, Formula error :(

(0) ShareShare
ReportReport
Posted on by 519

Hi,

I am building a message confirmation box when i button is press in the gallery, it confirms the action, then press the button, it will hide it from the gallery. here is the code for the popup, something isn't quite right

AndyPowerAppNew_0-1673559866393.png

AndyPowerAppNew_1-1673560046733.png

AndyPowerAppNew_2-1673560093670.png

 

 

The patch, works perfectly in a button on its own, is just when i'm adding it to the code above, I have the issue.

 

Please may someone help correct it please?

 

Thank you so much

Categories:
  • SebS Profile Picture
    4,882 Super User 2026 Season 2 on at

    @AndyPowerAppNew 

     

    This is due to the second Patch you have inside of it a Reset() Function that ends with ; you should not have this function inside of the Patch

     

     

  • AndyPowerAppNew Profile Picture
    519 on at

    Hi @SebS ,

    thank you , how do I correct this ? My attempts don’t seem to work

    Thanks 

  • SebS Profile Picture
    4,882 Super User 2026 Season 2 on at

    @AndyPowerAppNew 

     

    Remove the Reset from Patch and place it after ); when patch is done also it will be helpful when You copy the code that will make it easy to adjust it for You and past it back here 🙂

  • AndyPowerAppNew Profile Picture
    519 on at

    Hi @SebS ,

     

    Here is my code, i still cant get it working, please would you mind correcting it please?

     

    Set(glbMessageBox,
    {Message: "Are you sure you want to SignOut?" & Char(10) & "Press Yes to do so or No to not",
    AllowCancel: false,
    Action: Patch(
    StaffWhosIn,
    ThisItem,
    {Status: {Value: "Signed Out"}}
    );
    Patch(
    StaffWhosIn,
    ThisItem,
    Reset(TextInputStaff);
    {CheckOut: Text( Now(), "dd/mm/yyyy hh:mm:ss" )}
    );
    Navigate('Staff-ThankYou-SignOut2');

     

    Thank you kindly

  • SebS Profile Picture
    4,882 Super User 2026 Season 2 on at

    @AndyPowerAppNew 

     

    Set(glbMessageBox,
    {Message: "Are you sure you want to SignOut?" & Char(10) & "Press Yes to do so or No to not",
    AllowCancel: false,
    Action: Patch(
    StaffWhosIn,
    ThisItem,
    {
    Status: {Value: "Signed Out"},
    CheckOut: Text(Now(), "dd/mm/yyyy hh:mm:ss")
    }
    );
    Reset(TextInputStaff);
    Navigate('Staff-ThankYou-SignOut2');

     

  • AndyPowerAppNew Profile Picture
    519 on at

    Hi @SebS ,

    I have tried this, and still get same errors i think,

    AndyPowerAppNew_0-1673562202776.png

    I have tried different ways too, or if that doesnt work, im trying to make a confirmation popup, when user clicks button in gallery, then press "ok" it will remove.

     

    What do you think issue is?

     

    Thanks

     

     

  • SebS Profile Picture
    4,882 Super User 2026 Season 2 on at

    @AndyPowerAppNew 

     

    I thought You have some sort of component there 🙂

    But if You try to Set the variable that way, this will not work as You intend or at last I think it will not I will need to check it out  🙂

     

    Make a pop up and in the Pop up screen do buttons Sign Out and Stay or cancel and put this patch to the Sign Out button 🙂 that's the easiest and nice looking option for You

  • SebS Profile Picture
    4,882 Super User 2026 Season 2 on at

     

    @AndyPowerAppNew 

    You can also try this change

    Set(glbMessageBox,
    {Message: "Are you sure you want to SignOut?" & Char(10) & "Press Yes to do so or No to not",
    AllowCancel: false,
    Action: Patch(
    StaffWhosIn,
    ThisItem,
    {
    Status: {Value: "Signed Out"},
    CheckOut: Text(Now(), "dd/mm/yyyy hh:mm:ss")
    }
    )
    );
    Reset(TextInputStaff);
    Navigate('Staff-ThankYou-SignOut2');
  • SebS Profile Picture
    4,882 Super User 2026 Season 2 on at

     

    @AndyPowerAppNew 

    You can also try this change

     

    Set(glbMessageBox,
    {Message: "Are you sure you want to SignOut?" & Char(10) & "Press Yes to do so or No to not",
    AllowCancel: false,
    Action: Patch(
    StaffWhosIn,
    ThisItem,
    {
    Status: {Value: "Signed Out"},
    CheckOut: Text(Now(), "dd/mm/yyyy hh:mm:ss")
    }
    )
    );
    Reset(TextInputStaff);
    Navigate('Staff-ThankYou-SignOut2');

     

    There was missing ) at end of the Patch as well

     

     

     

  • AndyPowerAppNew Profile Picture
    519 on at

    Hi @SebS , Thank you for your suggestions - i have tried both and they aren't working, maybe its something i'm doing - please may you run my through the easier way of making a pop on gallery, if thats okay, will try this instead?

    Thank you, maybe im making things too tricky for myself 🙂

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard