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!
Solved! Go to Solution.
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.
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".
This field should be populated based on the selection of the "Target Alias" field:
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:
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!
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.
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!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
187 | |
82 | |
50 | |
37 |
User | Count |
---|---|
288 | |
242 | |
123 | |
75 | |
56 |