cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kyon84
Helper I
Helper I

How to set field default value based on another value

Hi,

 

trying to set field default value based on another field value. 

 

Got 2 sharepoint columns. Both choice. And I want if I choose in field (column A) value "USZ", then in another field (column B) will pop out "US01"

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @kyon84 ,

Do you want to display a choice field value based on selection of another choice field?
Could you tell me:

1)what controls do you use to display these two fields?

2)whether these two choice columns allow multiple selections?

I assume that: you use drop down to display these two fields, these two choice field not allow multiple selections.

 

If so, you could set like this:

1)drop down1's Items:

Choices(list1.column A)

drop down1's OnSelect:

Reset(dropdown2)

2)drop down2's Items:

Choices(list1.column B)

drop down2's Default:

If(
dropdown1.Selected.Value="USZ",
"US01"
)

 

 

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.

View solution in original post

3 REPLIES 3
joeinmay
Resolver II
Resolver II

Workaround:

Insert a Button
Button -> OnSelect ->
ClearCollect(SPlist,{ChoiceA: "USZ",ChoiceB: "US01"},{ChoiceA: "USX",ChoiceB: "US02"},{ChoiceA: "USY",ChoiceB: "US03"})

 

Insert Dropdown "DP1"
DP1 -> Items -> SPlist.ChoiceA

 

Insert Dropdown "DP2"
DP2 -> Items -> SPlist.ChoiceB
DP2 -> Default -> LookUp(SPlist,ChoiceA=DP1.Selected.ChoiceA,ChoiceB)

v-yutliu-msft
Community Support
Community Support

Hi @kyon84 ,

Do you want to display a choice field value based on selection of another choice field?
Could you tell me:

1)what controls do you use to display these two fields?

2)whether these two choice columns allow multiple selections?

I assume that: you use drop down to display these two fields, these two choice field not allow multiple selections.

 

If so, you could set like this:

1)drop down1's Items:

Choices(list1.column A)

drop down1's OnSelect:

Reset(dropdown2)

2)drop down2's Items:

Choices(list1.column B)

drop down2's Default:

If(
dropdown1.Selected.Value="USZ",
"US01"
)

 

 

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.

View solution in original post

Hello,

How can we do this if dropdown 2 allows multiple selections and i want to set multiple values as default?

Thanks

 

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 (965)