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

Power Apps button (OnSelect) condition

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • 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
    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

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard