cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

ComboBox Default Property - formula not working

Hi Folks -

I have a ComboBox (a choice field from a SP List) and I'm trying to add a formula to it to automaticaly populate based on a selection of another field.  This formula works perfectly on a Default propery for a  Label or input text field:

LookUp(RD_Target_List, Name=Concatenate("PFR-",DataCardValue25.Text), Target_Long_Name)

But when I add it too the ComboBox Defauly property, it fails saying it needs a text value? Can someone assist?

 

Thank you!

13 REPLIES 13
Highlighted

@simms7400 

Okay...let's get this going...

Let me know the Items property of the ComboBox.  Assigning defaults and selections is always based on the items of the combobox.  Items is a table of records WITH a signature.  Defaults are (in the case of the ComboBox) as table of records WITH the exact signature.
So, let's start with the Items property.

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

@RandyHayes 

 

Hi Randy!

 

Allow me to clarify. The field I'm trying to populate is maybe not a ComboBox, although I have been calling it such. It's a choice SharePoint List field. It's called "Business_Owner" (display name is R&D Unit) and located in SP List called "rdAsset".

RANDYY.jpg

 

This field should be populated based on the selection of the "Target Alias" field:

target alias.jpg

 

Target Alias is populated with a list of values from the table "RD_Target_List" and "Alias" column.  And is this what "RD_Target_List" like:

lookup.jpg

So based on the selection of "Target Alias", I need to return the value in the "Business_Owner" column from "RD_Target_List".

 

The values in the "Business_Owner" field on my form are the same list of values in the "Business_Owner" column of "RD_Target_List".

 

I hope this makes sense, if not let me know.

 

Thank you, Randy!

 

View solution in original post

Highlighted

@simms7400 

So let me repeat to make sure I understand - you have a column in your SharePoint list called "Business_Owner" that is a choice column and has all the same values (as the choices) as the table RD_Target_List's Business Owner field.

You have another column in your SharePoint list called "Target Alias" - I presume that it has all the same values as the Alias field in your RD_Target_List.

You need R&D Unit (Business_Owner) to default to the value of the "Business Owner" as determined by a lookup from the RD_Target_List based on the "Target Alias" value selected.

 

I hope the above is correct...

 

Now - Your ComboBox (DataCardValue51) should be set to the following:

   Items : Choices(rdAsset.Business_Owner)

   DefaultSelectedItems :  {Value: Lookup(RD_Target_List, Alias=yourTargetAliasControlName.Selected.Value, Business_Owner)}

I didn't see the name of the combobox control for your Target Alias, so just substitute that in the blue above.

 

I hope that nails it for you.

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

View solution in original post

Highlighted

@RandyHayes 

 

As usual, this worked like a charm!!! I incorporated this into 5 other datacard and its working like a charm!!

 

This will surely help keep wrong data entris from being submitted.  Than you again Randy have a great day!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,149)