web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Automatically Update v...
Power Apps
Unanswered

Automatically Update value of a dropdown if label value met

(0) ShareShare
ReportReport
Posted on by 517

Hi Experts,

 

I just want to ask how can I achieve this requirement.. I need to update a certain dropdown field named "Interested" with option 'Yes' or 'No'... 

 

Initially, Interested is null. Requestor will only modify item if they are interested or not.. 

I have a label with this formula 

jaina_0-1635326890636.png

 

and I want to modify automatically the Interested field value to "NO" if Label is equal or greater than '30'.

 

Here's my sample formula that I got an error..

jaina_1-1635327002636.png

 

Categories:
I have the same question (0)
  • AmeerJab Profile Picture
    370 on at
    Re: Automatically Update value of a dropdown if label value met

    Hello,

    if the required outcome from Value(Label3.Text) is the text then Label3.Text is the correct formula, but if you want the count or characters you have in Label3 then Len(Label3.Text) is the formula, and what are you referring here with Value(30)?

  • jaina Profile Picture
    517 on at
    Re: Automatically Update value of a dropdown if label value met

    Hi @AmeerJab , thanks for responding.

     

    To clarify, what I want to achieve is that when label <= 30, Interest field = NO else Interested field value.

     

    For label, I just created a Label with a formula to count the days from creation date to today's date.

  • AmeerJab Profile Picture
    370 on at
    Re: Automatically Update value of a dropdown if label value met

    i have tested it on my side, 

     

    try it like this :

    If(Value(Label3.Text) <= 30,
    DataCardValue35.Selected.Value = "No",
    DataCardValue35.Selected.Value)

     

  • jaina Profile Picture
    517 on at
    Re: Automatically Update value of a dropdown if label value met

    Where did you put the formula? Is it to UPDATE property?

     

    jaina_0-1635329047653.png

    I tried and yet encounters error

  • AmeerJab Profile Picture
    370 on at
    Re: Automatically Update value of a dropdown if label value met

    Yes in the UPDATE property, if you hover over the red lines or click on the App checker icon top right, what does the error says

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at
    Re: Automatically Update value of a dropdown if label value met

    @jaina 

    The Update formula you have will not work as you are trying to "set" a control directly in the true part of your If statement and return the selected value in the second part.

     

    Your error is that your underlying column is most likely not a boolean column and a text column - as that would not exist.

     

    So, to be clear, the first part of your If statement determine is the value is less than 30.  If that is true, then you do a comparison of DataCardValue35.Selected.Value to "NO" - this will return a true or a false - it does NOT set the dropdown.  In the false part of the formula, you are returning the value selected in the dropdown, which will be (based on the first part) a Text value.  This will make no sense to PowerApps and the Update property.

     

    If you are trying to change the value in the "Dropdown field" as you call it, then your formula needs to be on the Default property of the Dropdown itself.

    The formula would be :  If(DateDiff(DateValue(DataCardValue37.Text), Today()) <= 30, "NO", "YES")

     

    Now this is assumptive because I am not sure what your dropdown items are.

     

    So, if this doesn't take you where you need, then please respond with the following:

    1) What field/datacard is the Update property you originally showed?

    2) What data type is that field?

    3) What is the Items property of your Dropdown?

    4) IS it a Dropdown or a Combobox?

     

    I hope this is helpful for you.

  • jaina Profile Picture
    517 on at
    Re: Automatically Update value of a dropdown if label value met

    Hi @RandyHayes,

    Thanks for responding and clarifications.

    What I am trying to achieve is when I create an item in SP List, Interested field is not visible so initially its value is NULL ..

     

    It will only be visible once item is created and when I modify the item, Interested field will be visible..

    If no one's modify the item to select the Interested field after 30 days, I want to set the value of Interested field to "NO" automatically using power apps formula.. otherwise it will return the initial value..

     

     

     

    Here's the fields that I am using.

     

    1. Field: Interested

        Data Type: Dropdown in SP List with Yes or No Choices

        Update Formula: If(Value(Label3.Text) <= 30, DataCardValue35.Selected.Value = "No", DataCardValue35.Selected.Value)

     

     

    2. Field: Label

        Data Type: Label in power apps

        Text Formula: DateDiff(DateValue(DataCardValue37.Text), Today())

     

        

  • v-jefferni Profile Picture
    on at
    Re: Automatically Update value of a dropdown if label value met

    Hi @jaina ,

     

    If it is indeed the Yes/No column of SharePoint list, it will only accept Boolean value to update the field:

    vjefferni_1-1636104119015.png

    vjefferni_0-1636103878056.png

     

    Then below codes in Update of the Card will work:

    If(Value(Label3.Text) <= 30,
     false
     DataCardValue35.Selected.Value
    )

     

    However, like @RandyHayes said, you are definitely using a Choices column rather than a Yes/No column, the Choices column includes "Yes" and "No" choices.

    vjefferni_2-1636104587460.png

     

    As the result, the codes should be:

    If(Value(Label3.Text) <= 30,
     {Value:"No"}
     DataCardValue35.Selected
    )

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard