Hi Community,
I have a form connected to SharePoint, and a combo box drawing a long list of items
Basically, when someone selects an item in the Combo Box and saved the form, next time it loads the following happens:
Combo Box loads the previously selected value as i set the "DefaultSelectedItems" value to [Parent.Value]
However "ComboBox.Selected.Result" does not show any value when inserted on a label (RED label in the image below)
I use this basically to generate some information based on the selection. It worked well on the DropDown but now I am totally lost with the Combo Box type
Anyone help? Below screenshot for reference:
Solved! Go to Solution.
So I was able to fix this using a workaround, this is what i did:
Add a label inside the Data Card, let's call that "INTERNAL_LABEL" and use the below formula in the "TEXT" property to reference the default value if the ComboBox selected items was blank (usually the case if loading an existing item with the DefaultSelectedItems property)
TEXT property of INTERNAL_LABEL
If(IsBlank(combobox.Selected.Result), Parent.Default, combobox.Selected.Result)
I then create an external label "EXTERNAL_LABEL" and reference the the result of the "INTERNAL_LABEL" to it
TEXT property of the "EXTERNAL_LABEL"
'INTERNAL_LABEL.Text'
Works like a charm, just not the best way to do it I guess
Hope this could be helpful for anyone else stuck with this situation
Thanks
Luka
What is the Items property of your combo box?
Can you put the items code into a collection so we can view the Table?
ClearCollect(tempCollection,
your_items_code_here
)
The collections viewer can be found on the view tab at the top of the screen
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
hI @mdevaney
Thank you for responding back so promptly.
Just to recap my issue once again, I choose a value in a ComboBox (I can see the value correctly shown when i reference my value in a label), save the form and close it.
When i reload that item, the ComboBox shows my selected value however if I reference the ComboBox.Selected.Result into a label it shows blank.
Please see the information below for reference:
ComboBox Items Code (It is already pulling values from an existing collection):
SortByColumns( Distinct(Filter(PASSPORTLIST, COUNTRY = COUNTRYDROPDOWN.Selected.Result), EMPLOYEENAME0),"Result", Ascending)
I've also Put my code into a collection, and it looks like no filters are being applied, instead the entire table is fetched instead of the previously selected item, below image for reference:
Also, this is how it looks like when I make a change on the ComboBox, label reflects immediately:
So I was able to fix this using a workaround, this is what i did:
Add a label inside the Data Card, let's call that "INTERNAL_LABEL" and use the below formula in the "TEXT" property to reference the default value if the ComboBox selected items was blank (usually the case if loading an existing item with the DefaultSelectedItems property)
TEXT property of INTERNAL_LABEL
If(IsBlank(combobox.Selected.Result), Parent.Default, combobox.Selected.Result)
I then create an external label "EXTERNAL_LABEL" and reference the the result of the "INTERNAL_LABEL" to it
TEXT property of the "EXTERNAL_LABEL"
'INTERNAL_LABEL.Text'
Works like a charm, just not the best way to do it I guess
Hope this could be helpful for anyone else stuck with this situation
Thanks
Luka
Hi,
I think I was able to solve this by using the DataCard.Default property. That way, you won't have to create additional text fields and reference those.
If(IsBlank(ComboBox.Selected.Result);ComboBox_DataCard.Default;ComboBox.Selected.Result)
Best,
Bastiaan
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
193 | |
69 | |
49 | |
41 | |
30 |
User | Count |
---|---|
254 | |
120 | |
97 | |
91 | |
78 |