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 / Update Choice dropdown...
Power Apps
Unanswered

Update Choice dropdown with if statement

(0) ShareShare
ReportReport
Posted on by 920 Super User 2024 Season 1

Hi,

 

This is my ITems property of my dropdown:

 

If(DataCardValue48.Text = "Approve", Choices([@'data source'].Status_two) ,Choices([@'data souce'].Status_two))

 

 

How can I do this - 

 

If(DataCardValue48.Text = "Approve", Choices([@'data source'].Status_two) = "Complete" ,Choices([@'data souce'].Status_two))

 

I get an error on this.

 

Thanks.

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @wonka1234 ,

     

    Can you please explain in plain text what you are trying to achieve? Unfortunately it is not clear from the formulas you posted.

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @BCBuizer   

     

    Trying to update a choice dropdown in my powerapp based on another field.

     

    So if field a datacard = "Complete" then make the dropdown a certain choice. if not, leave the original choice there.

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @wonka1234 ,

     

    In that case I hope the below is of help:

    If(
     DataCardValue48.Text = "Complete", 
     Choices([@'data source'].Status_two), //Items for when the value is complete
     Choices([@'data souce'].Status_two) //Items for when the value is not complete
    )

     

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @wonka1234,

     

    This is a poorly written question.

     

    Assuming:

     

    • Your data source is Dataverse (judging by your Choices syntax)
    • You're using a Form
    • You want to set the default choice displayed in the dropdown only when the Form is in New Mode.

    Apply the below to the Default property of the DataCard (not the DataCardValue).

     

    If(
     Form1.Mode = FormMode.New,
     Switch(
     DataCardValue48.Text,
     "Approve",
     'Your Choice Field'.'Your Choice Value',
     "Complete",
     'Your Choice Field'.'Your Choice Value'
     ),
     ThisItem.'Your Choice Field'
    )

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

     

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @Amik  do i need the form modes?  Hopefully this adds more clarity..

     

    If DataCardValue48 = Approve

     

    wonka1234_0-1693314993263.png

     

     

    Then update my STatus Card (DAtaCardValue_49_1)

     

     

    Currently ITems Property of this card - 

     

    If(
    DataCardValue48.Text = "Approve",
    Choices([@'DataSource'].Status_two),
    Choices([@'DataSource'].Status_two)
    )

     

     

    these are my 3 choices..  if my date change approval = approve, make this Complete. if not approve, leave the status as is..

     

    wonka1234_2-1693315170968.png

     

    wonka1234_1-1693315157959.png

     

     

     

     

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @wonka1234 - I do not know if you need the check the Form Mode. The above example I gave based on some assumptions I made due to the lack of clarity from your description. 

     

    Once again:

     

    1. What is your data source. Is it Dataverse?
    2. Should the Status field only update when the Form is in New Mode?

     

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard