Hi Guys,
I have a gallery with various combo boxes on, when a user clicks submit, the data from the gallery controls is sent to a collection. I am trying to hide / display icons if the current item exists in the collection.
The trouble I have is that when a user submits data to the collection, the default values are displayed in the combo box using ThisItem.Supplier, but when I try to reference the combobox using cmb_Supplier.Selected.Result it doesn't return any data. How do I pick up the current text within the combobox?
Solved! Go to Solution.
Hi @v-qiaqi-msft ,
Thank you,
In the end I solved the issue by using the following formula to reference my combo box
If(IsBlank(cmb_Supplier.Selected.Result),
ThisItem.'Supplier',
cmb_Supplier.Selected.Result)
This formula always returns a value
I tried changing my DefaulSelectedItems property from {Value:ThisItem.'Supplier'} to {Result:ThisItem.'Supplier'} but that also did not resolve the issue.
I'm sure there is a better way to solve my problem but my solution is working 😊
In the DefaultSelectedItems of the Combobox:
({Value: ThisItem.Supplier})
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi @eka24 , thank you, but perhaps I didn't explain my problem very well.
I already have the code above in the DefaultSelectedItems property of the combo box, the default value is displaying correctly.
The issue I have is that I cannot reference the default value of the combo box. Let's say I have a textbox next to the combo box with a default value of cmb_Supplier.Selected.Result. As soon as I submit the data to my collection, my textbox is blank (even though my combo box displays the correct default value)
Try with a LookUp in the Textbox assuming you have an unique column:
LookUp(CollectionName, ID = ThisItem.ID, ColumnInCombobox)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi @JimJim,
Have you solved your problem?
Could you please tell me that how you set the DefaultSelectedItems property of the Combo Box?
Please modify the formula you set for the DefaultSelectedItems property of the Combo Box as below:
{Result:ThisItem.Supplier}
Hi @v-qiaqi-msft ,
Thank you,
In the end I solved the issue by using the following formula to reference my combo box
If(IsBlank(cmb_Supplier.Selected.Result),
ThisItem.'Supplier',
cmb_Supplier.Selected.Result)
This formula always returns a value
I tried changing my DefaulSelectedItems property from {Value:ThisItem.'Supplier'} to {Result:ThisItem.'Supplier'} but that also did not resolve the issue.
I'm sure there is a better way to solve my problem but my solution is working 😊
Hi @JimJim,
Glad that you have solved your problem.
Could you please mark your own reply as an answer to help more users who may have the same issue with you.
Thanks for your co-operation.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
187 | |
53 | |
41 | |
37 | |
31 |
User | Count |
---|---|
250 | |
75 | |
71 | |
68 | |
65 |