web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Problem with formulas ...
Power Apps
Answered

Problem with formulas on the popup component

(0) ShareShare
ReportReport
Posted on by 43
Hello,
 
A year ago, I created an application. I have many different controls and galleries. I also have several POPUP windows created in components. I added custom properties to the components and selected "OKClick" and "CancelClick" and appropriately set the buttons in the component. In the application screen, I added this component and in the "OKClick" and "CancelClick" properties, I had my formulas.
 
Everything was working fine until yesterday when I decided to activate the new analytical engine in Power Apps. From now on (even after reverting to the old engine), no formulas work in the "OKClick" and "CancelClick" properties. Even the simplest ones like "ResetForm(My_Form)" or "Navigate(HOME, ScreenTransition.Cover)". I keep getting the message: "Invalid argument type. Cannot use Boolean values in this context."
 
Interestingly, when I enter several formulas separated by a semicolon, only the first one does not execute, but the rest do.
For example, when I enter:
 
ResetForm(FormEDIT_2);
SubmitForm(Form_ZINWENTARYZOWANO);
Navigate(HOME,ScreenTransition.Cover)
 
only executes:
 
SubmitForm(Form_ZINWENTARYZOWANO);
Navigate(HOME,ScreenTransition.Cover)
 
and ResetForm(FormEDIT_2) is skipped because the same error occurs at the first semicolon.

 
Categories:
I have the same question (0)
  • Suggested answer
    Gabriel G. Profile Picture
    831 Super User 2025 Season 2 on at
    Hi!
     
    When you want to execute many actions in the same spot, you need to double ‘;’ after each action:
     
    ResetForm(FormEDIT_2);;
    SubmitForm(Form_ZINWENTARYZOWANO);;
    Navigate(HOME,ScreenTransition.Cover)
    I hope it helps!
    ______________________
     
    Please click Does this answer your question 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 a Like.
  • Suggested answer
    FatihDagdelen Profile Picture
    53 on at

    The main reason for this issue is that after enabling the new analytics engine in Power Apps, the custom component’s "OKClick" and "CancelClick" properties are being interpreted differently.

     

    Previously, Power Apps allowed actions (functions like ResetForm(), Navigate(), etc.) to be executed directly from these properties. However, after enabling the new engine, these properties may now be interpreted as Boolean instead of Action (behavioral functions).

     

    As a result, Power Apps is treating ResetForm(FormEDIT_2); as an invalid Boolean operation instead of an Action, leading to the error:

    "Invalid argument type. Cannot use Boolean values in this context."

     

    Possible Solutions

    1. Change the Data Type of "OKClick" and "CancelClick" to Action

    Since the issue stems from the misinterpretation of these properties, the best solution is to explicitly set their type to "Action".

     

    Steps:

     

    Open your custom component in Power Apps.

    Go to the "Custom Properties" section.

    Locate "OKClick" and "CancelClick" properties.

    Check their data type:

    If they are set to Boolean, change them to Action.

    Save the changes and test again.

    2. Use a Workaround to Execute ResetForm()

    If you cannot change the property type, try wrapping ResetForm() inside an If(true, ResetForm(FormEDIT_2)) statement.

     

     

    If(true, ResetForm(FormEDIT_2))

    This forces Power Apps to evaluate it as an action rather than a Boolean value.

     

    3. Use a Global Variable to Trigger ResetForm()

    Another approach is to store a Boolean variable and use it in an external event.

     

    Steps:

     

    Set a global variable:

     

     

    Set(varResetForm, true)

    Trigger the form reset in a separate event (e.g., OnVisible or OnSelect of the screen):

     

    If(varResetForm, ResetForm(FormEDIT_2); Set(varResetForm, false))

    This ensures that ResetForm() is executed outside the potentially misinterpreted "OKClick" or "CancelClick" properties.

     

    I hope one of these help you!

     

    Best!

     

    Fatih :)

     

  • Verified answer
    KamilH Profile Picture
    43 on at
    Thanks for the tip about Boolean in components. It didn't occur to me to check it, and after switching to the new Power Apps engine, Apps decided to change Boolean to Text in my all components. Ahh Microsft...
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 724 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 325 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 248

Last 30 days Overall leaderboard