Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Update Choice dropdown with if statement

(0) ShareShare
ReportReport
Posted on by 909 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.

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Update Choice dropdown with if statement

    @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?

     

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Update Choice dropdown with if statement

    @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,665 Super User 2024 Season 1 on at
    Re: Update Choice dropdown with if statement

    @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

     

  • BCBuizer Profile Picture
    21,999 Super User 2025 Season 1 on at
    Re: Update Choice dropdown with if statement

    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
    )

     

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Update Choice dropdown with if statement

    @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
    21,999 Super User 2025 Season 1 on at
    Re: Update Choice dropdown with if statement

    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.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,596 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard