Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

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

Categories:
  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Power Apps button (OnSelect) condition

    Hi Drew, thank you for your great help!

  • Verified answer
    Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: Power Apps button (OnSelect) condition

    Hi @Anonymous ,

    Have you tried something like this?

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

    or this?

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

     

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 19

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 15 Super User 2025 Season 1

Overall leaderboard

Featured topics