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 / Change Value Based on ...
Power Apps
Unanswered

Change Value Based on DropDown

(0) ShareShare
ReportReport
Posted on by 353

Hi all.

 

I have a dropdown column with Items = "Yes/No".

And then, I have another column that accepts number data type only.

All columns are connected to SharePoint as data source.

 

My problem occur when user choose "No" for the dropdown, the second column should be invisible and the value should be blank. So, I made my coding like this:

Column2.Update = If(HasTargetDropDown.Selected.Value = "Yes", Value(TargetTrainingHour.Text),Blank())

For testing, when i tried to modify the dropdown selection from "Yes" to "No", I observe that the data for dropdown has changed in the sharepoint (whch is correct), but the data for second column doesnt change in the sharepoint.
I think it is because blank are null data type, not number. Is there any solution for this?

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @_kikilalaaa 
    I've seen a couple blog posts suggesting you must turn on "Formula Level Error Management" in Advanced Settings in order for your code to work.  But if that does not work...

     

    My suggestion would be to change your Update property to write 0 instead of blank.

     

    Column2.Update = If(HasTargetDropDown.Selected.Value = "Yes", Value(TargetTrainingHour.Text),0)

     

    Then in SharePoint I would also change the Default value of your TargetTrainingHour column to be 0. 

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @_kikilalaaa ,

    Do you want to update a number field to blank?
    If so, this formula is ok:
    Column2.Update = If(HasTargetDropDown.Selected.Value = "Yes", Value(TargetTrainingHour.Text),Blank())

    You just need to turn on this setting:

    3276.PNG

     

    If you turn off this setting, it will not update if your data type is not number (blank value is not number type.)

    After turning on this setting, system will not check for data type, then you will be able to update with blank value to number field.

     

     

    Best regards,

     

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 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard