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 / Power Apps button (OnS...
Power Apps
Answered

Power Apps button (OnSelect) condition

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I have a Button which will capture locationsubmit form if "Schedule Status DataCard" is set at "Completed".  Otherwise it will just submit form without capturing location. Thus I have the following:

OnSelect property of Button1: If(DataCardValue11.Selected.Value="Completed",Set(jas_plannerjaslyn, BingMaps.GetLocationByPoint(Location.Latitude, Location.Longitude));SubmitForm(Form1),SubmitForm(Form1),SubmitForm(Form1)).

Data source is a Dataverse Table.

 

However I got an error message:

Incompatible types for comparison. These types can't be compared: OptionSetValue(Schedule Status), Text.

We can't evaluate your formula because the values being compared in the formula aren't the same type.

Location: Button1.OnSelect.

 

Thanks in advance for your help!

 

Stephen

  • Verified answer
    Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Anonymous ,

    Have you tried something like this?

    DataCardValue11.Selected.Value=Choices(ScheduleStatus).Completed
    

    or this?

    Text(DataCardValue11.Selected.Value)="Completed"
    

     

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Drew, thank you for your great help!

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard