cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lroi7
Microsoft
Microsoft

Default value

Hello!

 

I am trying to figure out how to set a default value of a dropdown field based on the value selected from another dropdown field. My data is coming from a SharePoint list, one choice column is called 'Employee Type' (Selectable Options: Direct Employee or Contractor) and another choice column is called 'Job Level' (Selectable Options" 1, 2, 3, 4, 5, 6, Undefined).

 

What I was envisioning is that when someone selects 'Contractor' in the Employee Type field, the default value on the Job Level field would be 'Undefined', if they were to select Direct Employee, then they will be able to choose from all the options in the Job Level field. 

 

I have been trying with a IF formula: If(DataCardValue262.Selected.Value= "Contractor" , "Undefined", Parent.Default)

 

But getting an error message: Invalid argument type (Record). Expecting a Text value instead.

 

Any thoughts?

1 REPLY 1
RandyHayes
Super User
Super User

@lroi7 

Assuming these are Dropdowns and not Comboboxes first off...

 

Next question is, what is the underlying field type of the datacard that this dropdown is contained in?  If it is a choice column, then you need to adjust your formula to retrieve the .Value of the default.

In general, you would put this formula in the Default property of the DataCard and not in the Dropdown control as working with Parent.Default directly in the control can be problematic.

You seemed to indicate that you were putting this into the Default for the dropdown control.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,705)