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 / What is wrong with thi...
Power Apps
Answered

What is wrong with this formula?

(0) ShareShare
ReportReport
Posted on by 192
if(DataCardValue34.Selected.Value="Yes","Closed",If(IsBlank(DataCardValue34.Selected.Value)&&Today()>DateValue1.SelectedDate,"Past Due", If(IsBlank(DataCardValue34.Selected.Value)&& Today()<= DateValue1.SelectedDate, "In Process")))

 

I get an incompatible error between OptionSetValue(NCR Complete (NCR & P/Cars)), Text.

 

Any help to get this working appreciated!

 

Goal: Display the STATUS of the Entry at the top of the form (and to also be displayed on the dashboard page)

Categories:
  • michellecoslet Profile Picture
    192 on at

    edited to add,

    I simplified it to see if maybe the date field was this issue but I even have an issue with just the first argument.

    michellecoslet_1-1647896051137.png

     

     

    michellecoslet_0-1647895983001.png

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @michellecoslet,

    OptionSetValue has a different value with the normal choice value format in SharePoint list.

    [@OptionSetName].OPtion

    So you should modify your formula as below:

    If(DataCardValue34.Selected.Value=NCR Complete (NCR & P/Cars).Yes,"Closed",If(IsBlank(DataCardValue34.Selected.Value)&&Today()>DateValue1.SelectedDate,"Past Due", If(IsBlank(DataCardValue34.Selected.Value)&& Today()<= DateValue1.SelectedDate, "In Process")))

    vqiaqimsft_0-1648085293634.png

     

     

  • michellecoslet Profile Picture
    192 on at

    Thank you for the response!!

     

    So I first tried to copy and paste the formula you provided and I received the following errors (underlined and red):

     

    If(DataCardValue34.Selected.Value=NCR Complete (NCR & P/Cars).Yes,"Closed",If(IsBlank(DataCardValue34.Selected.Value)&&Today()>DateValue1.SelectedDate,"Past Due", If(IsBlank(DataCardValue34.Selected.Value)&& Today()<= DateValue1.SelectedDate, "In Process")))

     

     

    Then I removed the word "value" after "selected" which got rid of most of the errors. The only error I see now is under the equal sign after the first argument with the issue shown below the formula. 

     

    If(DataCardValue34.Selected='NCR Complete (NCR & P/Cars)'.Yes,"Closed",If(IsBlank(DataCardValue34.Selected)&&Today()>DateValue1.SelectedDate,"Past Due", If(IsBlank(DataCardValue34.Selected)&& Today()<= DateValue1.SelectedDate, "In Process")))

     

    michellecoslet_0-1648128430027.png

     

  • michellecoslet Profile Picture
    192 on at

    Not sure if this will make a difference in whether or not this is possible, but our dropdown has been updated to have two choices: Yes and No

     

    Here is the updated formula i am trying:

    If(DataCardValue34.Selected.Value=NCR Complete (NCR & P/Cars).Yes,"Closed",If(DataCardValue34.Selected.Value='NCR Complete (NCR & P/Cars)'.No)&&Today()>DateValue1.SelectedDate,"Past Due", If(DataCardValue34.Selected.Value='NCR Complete (NCR & P/Cars)'.No)&& Today()<= DateValue1.SelectedDate, "In Process")))

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @michellecoslet,

     I hope we can focus on one issue for now, and then go on to other issues besides that.

     

    Just add a Label and set the Text property as below:

    If(DataCardValue34.Selected.Value=NCR Complete (NCR & P/Cars).Yes,"Closed")

    If the Label displays the string "Closed", then the option set value format is correct.

    vqiaqimsft_0-1648173313185.png

    Make sure the the OptionSet name is 'NCR Complete (NCR & P/Cars)', you do not add the single quote '' to the option set name, modify as below to check if it works: 

    If(DataCardValue34.Selected.Value='NCR Complete (NCR & P/Cars)'.Yes,"Closed",If(IsBlank(DataCardValue34.Selected.Value)&&Today()>DateValue1.SelectedDate,"Past Due", If(IsBlank(DataCardValue34.Selected.Value)&& Today()<= DateValue1.SelectedDate, "In Process")))

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard