cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
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

@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 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!

@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

@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 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!

View solution in original post

@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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,975)