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 / Set DropDown value bas...
Power Apps
Unanswered

Set DropDown value based on number in another field

(0) ShareShare
ReportReport
Posted on by 15

Hi,

 

I have a PowerApps app based from a SharePoint List and in it I have one field (Outcome) based on a dropdown list, what I am trying to do is:

If the user enters the number 3 in another field of type number, i want to set the Outcome dropdown value to "Declined" but otherwise leave the Outcome value to whatever the user chooses from the dropdown.

I've read so many threads now online but none work as I can't seem to get Powerapps to access the number in the second datacard.

I have checked that the second field is definitely of type Number, but the only parameter i get to access the data in the datacard is DataCardValue177.Text and that fails as the value is not of type text

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,399 Most Valuable Professional on at

    Hi @Jonmoon74 ,

    You did not provide your filter code, but the test you need is

    Value(DataCardValue177.Text)=3

    or

    DataCardValue177.Text="3"

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Jonmoon74 Profile Picture
    15 on at

    Thanks for the reply @WarrenBelz, but when i try and use that in an If statement on the Default property of the DropDown field, i get an error that the formula uses scope that is currently unsupported and the formula cannot be evaluated

  • Prakash4691 Profile Picture
    1,332 on at

    Hi @Jonmoon74 ,

     

    On onchange property of text input save the status in updatecontext.

     

    if it is equal to 3 set to active, in your case it would be declined.

     

    UpdateContext({StatusValue: If(Value(TextInput2.Text) = 3, NewStatusReason.'Active ')})

     

    Then in Default property of dropdown set updatecontext variable "StatusValue".

     

     

    Regards,

    Prakash

  • Jonmoon74 Profile Picture
    15 on at

    Hi Prakash,

     

    I'm not following how NewStatusReason.'Active ' would set Declined from the dropdown list, am i missing something?

  • Prakash4691 Profile Picture
    1,332 on at

    Hi @Jonmoon74 ,

     

    It is just an example, newstatus reason is the list of values available in my dropdown, active is the value which will get set based on condition.

     

     

    Regards,

    Prakash

  • WarrenBelz Profile Picture
    154,399 Most Valuable Professional on at

    @Jonmoon74 ,

    One of those two has to be valid if you have a number in there.

    If you want me to help you here, please supply the code you are using in Text.

  • Jonmoon74 Profile Picture
    15 on at

    Hi @A-Warr & @Prakash4691 ,

     

    Thank you both for trying to help, but none of the above seems to work, there must be something really simple I am missing, but since the setting of Declined in the Outcome field is needed to trigger a power automate flow, I have for now just added an extra clause to the automate flow to also pick up the value of 3 in this field and mark as Declined outside the app. - not as elegant as doing it inside the app but does the job while i root around for the bug that is stopping things

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard