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 / Powerapps Button condi...
Power Apps
Unanswered

Powerapps Button conditioned to submitform or resetform

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi! here is a code i'm trying to make work. basically if the OR% is 100% and No loss Reported was selected with the dropdown box, clicking the button would either submit or reset the form. 

 

P.S. I also have a display form that gives the OR value but i gave up in using it to be the basis for the button but if you have any ideas on how to capture it and use it in buttons that would be great too. 

 

If(And(Gallery5.Selected.'OR (%)'=1,DataCardValue47.Text="No Loss Reported"),SubmitForm(Form2),ResetForm(Form2))

 

Thank you!

Categories:
I have the same question (0)
  • alaabitar Profile Picture
    1,503 Super User 2024 Season 1 on at

    Hey @Anonymous 

     

    If think by putting

    If(And(DataSourceName.'OR (%)'=1,DataCardValue47.Selected.Value="No Loss Reported"),SubmitForm(Form2),ResetForm(Form2))

    This should work.

    Make sure to replace "DataSourceName" with the actual name of your data source

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I've changed it a bit and there are no errors. However, it keeps submitting even though the cleared is selected but without having the 100.

     

    P.S. I changed a few things like "Cleared" from "No loss reported" and deleted "None" instead left it blank.

     

    Here it is.

     

     

    If(And(DataCardValue11.Text="100",DataCardValue47.SearchText="Cleared"), SubmitForm(Form2),If(And(DataCardValue11.Text<>"100",DataCardValue47.SearchText="Cleared"),ResetForm(Form2),If(IsBlank(DataCardValue47),ResetForm(Form2),SubmitForm(Form2))))

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard