cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
_kikilalaaa
Level: Powered On

Change Value Based on DropDown

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?

2 REPLIES 2
Super User
Super User

Re: Change Value Based on DropDown

@_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."

Community Support Team
Community Support Team

Re: Change Value Based on DropDown

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,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,445)