Power Apps Combo Box DefaultSelectedItems
HTML-код
- Опубликовано: 3 мар 2021
- It is no secret that the Combo box is a grumpy control. So in this video I break down how to make it less grumpy by setting its default(s). I also teach a bit on the Table function, in operator, and hand crafting a record. Good ole fashion nerdy fun!
Power Apps Consulting and training at www.PowerApps911.com - Наука
Saved the day for me today! Was beating my head against the way trying to figure out how to show previously selected values from a hard-coded dropdown list.
Awesome, glad to help. 😎
Saved my life on that comma-delimited source... Appreciate your videos man! Life saver!
After all this time, these still do my head in, plus I had to clear out a table again and again and have the items column renamed to value from a more logical name...but it finally worked. Thank you!
Great Explanation Shane, appreciate sharing your knowledge, I caught up into a problem with Combo box and almost spent a day trying to resolve, but had no luck, and I started looking for help over internet and came across your video which helped in solving my problem in less than 30mins. thank you very much
Although Ive watched these videos before, rewatching them and realizing its so much easier to follow when Ive gained more experience is satisfying. Loved when you renamed columns from result to value, its like telling powerapps “look at me, Im the captain now”
THANK YOU. You helped me solve my immediate problem, and you helped me to better understand some of the fundamentals MUCH better than I did 15 minutes ago!!!!
I have referred back to this video so many times. Thank you for continuing to make useful content!
After hours spent trying to figure out why the default selected item was displaying blank this finally cleared it up for me! (The mismatch of Result and Value column names) You're my hero!!
Looking under the hood like this is always expands my understanding. Thank you.
That was my hope. 😍
Shane! I love you!!!!!!! I have been baching my head against a wall for days on this problem and you come up trumps again. Thank you !
Excellent video. Concise, yet thorough, as usual.
Much appreciated!
Hours of looking on Microsoft's documentation and you salved my problem in 5 minutes. Well done!
Awesome 😎
Amazing. Here are some that I had a hard time discovering and some that I couldn't. Learning from this video made my app even better.
That is awesome 😎
This is awesome! I fall into the category that needed to watch well beyond the 5-minute mark. Great video, this answers EXACTLY what I was needing to know.
Awesome! Thank you!
When I have an issue I almost always end up at your videos! I just need to start coming here first :)
You do. 😜 Glad to help.
Life saving video! 40 minutes from a meeting with clients and couldn't get my repeating tables with combo boxes to keep their values!!! THANK YOU!
Glad you got it. 😊
I thank you from the bottom of my heart good sir. Your video gave me my confidence back, after spending 2h30 banging my head against a wall, trying to manage a combobox through its default property.
Glad I could help, I hope your head doesn't hurt too bad. :)
seriously you are a life saver! this turorial gave the idea how I should go with this defaultSelectedItems. thanks!
Awesome! 🐶
Thank you for going the extra mile! Those are the videos that help! Anyone can be basic!
You are so welcome!
Hi Shane ! Thanks a lot for this tip I get more and more skilled with powerapps but I have to admit that you are my true master, I learnt powerapps and lanched a compagny thanks to your vidéos, out of this everything changed in my life as a total freelance now, when I will be richer I swear I'll propose you and family a plane ticket for holidays in Marseille and pay you a the best bouillabaisse on the vieux port ... I assume in one year or two ...
thx
Congrats on the success Sylvain. You did all of the hard work of learning and applying. No holiday required. Use your hard work and good fortune to take care of your family. That is all I want. 😊
Yes! That tutorial gave me the right inputs to get my combobox working (had this in the items "Choices([@'Project Reporting'].Customer)" and could not get it to select (and remember) the item from the gallery that was selected. Now it's done through this in the defaultselecteditems box: "LookUp(Choices([@'Project Reporting'].Customer), Value = glr_Reports.Selected.Title)"
Wow what a great tricks. You alway teach me new thing. Thank you so much Shane
Glad you enjoyed it!
Ohhh my godd.. Thanks alot I was searching for setting the default value of a combo box from a text box since 3hrs. You just explained it in an excellent way. Thanks alot. Keep doing more videos like this😍
Glad I could help
Thank you for another great video Shane.
Glad you enjoyed it
Shane thanks for all your videos, you keep me inspired on learning new stuff, you're my idol :) !
Happy to hear that!
Shane, you are very good, you saved me again.
Fun to watch learning at the same time. Thanks a lot!
Glad you enjoyed it!
THANK YOU! Excellent, easy to understand, to the point!
Happy to help. Have a great day. 🐶
Great video. Exactly what I was looking for. Keep up the awesome work.
Glad it helped!
@@ShanesCows Hey Shane is there a way to set multiple persons as a default in a people picker using this code: {
Claims: Concatenate(
"i:0#.f|membership|",
User().Email // Person email
),
Department: "",
DisplayName: User().FullName,
Email: User().Email, // Person email
JobTitle: "",
Picture: ""
}
Thank you Shane! I've created a AppSettings SharePoint list where I am storing app settings (defaults for filters, showing or hiding table columns, etc). Being able to grab a comma delimited string and set the DefaultSelectedItems from the SharePoint column is key to the success of this feature request in my solution...thank you!!
Thank you for this video. you are awesome Shane!
My pleasure!
Perfect. Just when I needed it as well.
Awesome
Thanks! Makes sense now on the combo defaults.
Happy to help. Have a great day. 🐶
Thanks Shane, you are the best!!!!!!
Thanks 🙏
thanks for the tip about the split function and the renaming the column from result to Value
Glad it helped!
You did so much heavy lifting buddy kudos to you.
Awesome job, Thanks a lot !!!!
Happy to help. Have a great day. 🐶
Great video as always. Just a quick insight I had: When selecting defaults on a combobox with a database table source, you can not use a function as a filter criteria as the query delegation will not work (e.g. LookUp(DBTable, Col1 = First(PowerBIIntegration.Data).col1). To solve this you first need to set a variable that can be used for filtering (e.g. Set(_varDBTable, First(PowerBIIntegration.Data).Col1 )); and default item= LookUp(DBTable, Col1 =_varDBTable)
Shane - I am truly a fan... I was in the same boat as another commenter - nothing seemed to work. But then I re-watched and applied the {Value: "ItemName"} method you used in the hard coded section for my issue - and it worked like a charm. Whoo Hoo, THANKS!
Awesome!
Pure spun gold, Shane
Thanks Carlos!
Still useful today after being posted 14 months ago. Matching the items column header within the defaultselecteditems and renaming the column to match it fixed my issue. Thanks
Thanks a ton for this video! Helped a lot!
You're welcome!
You are a true life saver. Thanks mate 👍👍👍👍👍👍 More thumbs up 👍👍👍👍👍 Thx
Glad it helped
Thank you for your contribution. I was struggling with the combo box and was looking for some help
You are welcome!
Awesome video!
Happy to help. Have a great day. 🐶
F..... awesom with the solution with renaming columns. Have saved me hours of work if I had just taken my time to watch the whole video. THX again Shane 🤦♂️🤦♂️🤦♂️
Glad to help Frank.
Thank you so much Shane
You are very welcome Dre.
It's a shame I can only subscribe and like once. Excellent content. These are great times, with all the development that Microsoft is putting behind PowerApps.
Thanks for the support. 🐶 We will take your once and appreciate it.
Thank you Shane!
Glad to help 😀
You solved my issue..thank u so much
Awesome! 🤩
You read my mind with this issue Shane! Multi Select filter to Multi Select!
Awesome
This is very usedfull information, thank for sharing.
Happy to help. Have a great day. 🐶
Thank you! Thank you! Thank you! The last method has made my day. Was worth watching the whole thing. Great Content Shane, Really appreciate you taking the time to explain these quirks in a simple way.
My case was that the user can select a button to set the default form data.
Button onSelect: UpdateContext({tempStr:TrimEnds(Concat(LookUp('Cert-FormDataTemplates',TemplateName = localTemplate,Stages).Value, Value&" "))})
my combo box has this code;
items: ShowColumns( Filter('Cert-ChoicesDataList',Not(IsBlank(Stages))),"Stages")
DefaultSelectedItems: Filter(ShowColumns( Filter('Cert-ChoicesDataList',Not(IsBlank(Stages))),"Stages"),Stages in tempStr)
I tried so many forums and got nowhere until I watched this. You are brilliant!
Thanks mate
Awesome. Makes my day when someone understands the deeper concept then just the answer. Good job! 🐶
Thank you. Very usefull video
Really awesome... thanks for this video... it was very useful for me... :)
Most welcome 😊
Thanks, my problem was whith record value and I could not understand the problem, you video was was amazing for me.
You're welcome!
Thank you for this video
My pleasure
Again, thank you, Shane! You are a rockstar. That bloody combobox "Default" field is confusing, why did they keep it there if it doesn't have any use!
I wish I knew, I wish I knew. 🥲
O meeen this really valuable video
Shane, thank you very much, I mean really MUCH ;-) I spent so much time on this apparently easy thing. …
Saved my life :)
Happy to help 😎😎
Thanks Shane, always appreciate your videos. I'm using the steps provided in your repeating table videos and have added a combo box to the gallery. The combo box selections do save in the collection. When I create a new record in the gallery, the context in the saved text fields remain on the display but the combo box selected item disappears. What am I missing?
Thank you sir!
Glad to help. 😀
Thank you again for saving me from losing more hair.
Of course! 🐶
nice one Shane
Thanks Max
Thank you, I wish the powerapps docs had more example of how to use the various controls
😊 more is always better
Looking Fresh Shane.. ;)
Thanks 🤩
AT 8:14 I saw the Light! Thanks Shane!
Awesome Lance. Hope all is well. 😎
Brilliant!
You are too Kind Louis! 🙌
YEEEESSSS!!!!!! Thank you thank you!!!!!!!
You're welcome!!
Thanks Shane
Happy to help. Have a great day. 🐶
Hi Shane, I have had a lot of trouble setting the default selected items of a combo box when looking at a choices column.
This seems to be a fundamental thing in Dataverse / Power Apps, using a combo box for a choices column but wow is it hard to find a way to set the default selected item.
You mention the solution during the video, I use something like this: {Value: varRecord.'Choices Column'}. I use this in several places in almost all of the apps I build. Thanks for dropping that in there. I feel like this should be a bigger deal...
This is the only place I have found this technique mentioned.
Great Video Shane. I would love to see Combox used in a gallery. I have still not got this to work where you can have items in a collection the use a combobox within the gallery to 1) select values and then 2) Default the values when coming back to edit. Comboboxes in a gallery using the OnChange to patch a collection end up going into an infinite loop as the onChange and DefaultSelectedItems conflict.
On change can cause loopiong. Maybe force the user to press a button to do the save instead of OnChange?
he did a very good video on changing just one record in a gallery and saving/updating it.
This is awesome. I'm using the steps provided in your repeating table videos and everything worked until I needed to make a change to one of the fields in the gallery to be a combo box. Being that once you save the value and go to the next line it doesn't retain what you entered in the first line. I added a ForAll to the DefaultSelectedItems. Now the portion that says when the Save Button is available seems to never be enabled despite saving each line. By setting a value in the DefaultSelectedItems does that make it seem that there is a already a value in the field being that you haven't selected anything yet?
Truely, Thank you
Always rely on you Shane! Stupid past me stored a column as a text value, with the control in the app a combobox, then the customer says we want multiple values in that column. Crap i cant change it to a lookup now i will loose all my data! Split to the rescue with rename columns haha Thanks!
Perfect 👌
Hi Shane! Thanks for the combobox tutorial. I have a question though. I'm trying to get the default values inside the combo box within the 'defaultselecteditems' property. While it does show the values inside the combobox, the values cannot be retrieved or displayed and the combobox is considered as empty unless the values are re-selected.
Is there a workaround for this? thanks!
Thanks!
Appreciate the support. 😎
Great explanation, I have a collection of persons, I need to select default all the persons. Thanks.
Glad it was helpful!
It took me a couple of days to realize about this, combo boxes are amazing but sometimes are strange
Combo Boxes do what Combo boxes want to do 😂
I am bookmarking this one. Thanks! One thing I wish you could cover in the future is how to populate a Person combobox with filtered people from another List. Like how do you show available Counselors in that combobox so that the user must select one of those. The problem is that a FILTER() in items will make that combobox loose its Person schema and you no longer can display Email, Picture, etc. out the combobox selection. Plus saving the selection and coming back to the form how do you do the DefaulSelectedItems to show what was previously selected and to display the Picture in a separate image control?
You could do a lookup, for 1 row, or a filter, for multiple selections, on the original data source using the selected items from the last combo box
Hi Shane, thanks for another great video. How do you use a combobox with another data source in a form? Both databases I have are from a sql database but different tables, for example I need a searchable combobox to look at a suppliers sql table and save the chosen value back to my repairs sql table when submitted through my form..? :)
You are a life save, spend hours on this before watching the video.....done now ;-)
Awesome 😎
Great video as always. I ahve an issue though. When I set my DefaultSelectedItems to {Value: ThisItem.}, even though the item shows as a default, PowerApps thinks the ComboBox is BLANK until I go in and re-select the item? I need to some comparison logic to check if the default matches another cell, but it won't work until I go in and re-select the item again in the ComboBox??? Any ideas please!?
Another great video Shane. One question, have you done a video on combobox and how to display the current value from a selected gallery versus being able to select a item from the combobox on a new form and then how to write the new selection to the sql table that the form uses?
I just had this very issue, I had to save the selected record to a variable then use that like this.. If(editMode = true,Filter(Departments,Name = varSelectedItem.Department)).Name or this... If(editMode,LookUp(tbl_NonStockSuppliers,Name = varSelectedItem.Supplier,ThisRecord)) then just use patch/update for SQL
Hi Shane,
How can build a collection from a Combo Box which dynamically add and deletes values as i add or delete records in the combo box ?
Thanks Shane. One query please. In my Items property for ComboBox I enter ["1", "2"] but when I actually open the app and click the ComboBox it shows values "35" and "37" instead of "1" and "2". Can you please help. Also I dont see the "Advanced Options" tab for my ComboBox.
great video Shane, quick question, how would i go about default a value from a listgroupmembers connection for the selected item from the gallery?
Thanks again for the good informative video Shan,
IF you don't mind,can you tell me how to set defaultselected item from CDS to combobox
Hey Shane... thanks for all the great videos.
I tried something and didn't manage to solve it... so I changed my approach... but I'm curious to see you show how it can be done.
I had one gallery and one form to show that record... and then I had another smaller form for users to fill out "requests" on the selected gallery Record...
The second form had one prepopulated field for the "Record ID" from the selected gallery record, so I could keep track on which record the request was attached to.
However in my attempts to be "clever" I used two sharepoint lists... where that ID-column in the second list was linked to the ID-column of the first list.
Now, no matter how I tried I couldn't get that column populated with the selected records ID when I submitted the second form.
So finally I just turned it into a simple number column to get it to work.
But I would love to know how it was supposed to be done... because I think I was close...
There is any way to select copy the text from different text boxes into one final text box.. I already did it but if .. let say the first text box in empty my final text box copy the space from text box 1.. there is any way to make the final text box to ignore if text box1 is empty??
Once again, great content Shane, thank you very much!
In one of my apps my registering several items according the distinct value of a table. For instance, it starts asking for a item, and then the quantity box shows up to insert a value. When I put the quantity the 2nd box item shows up, but the box shows the item I choose in the 1st. Do you know a simple way of removing the value from the 1st box in the 2nd box?
Best regards.
Hi Shane. Do you know how to filter the combo box that has status reason values to only show inactive status reasons?
Just a tip. If you want to use combobox selecteditems as string use concat....for one item, concat(combobox.selecteditems, result & "") for few items concat(combobox.selecteditems, result & ",") well you will get an idea.
Yup. Very common pattern. I thnk I showed that in the combobox video. This one I was trying not to get too far off topic on defaults.
I need help. I have been trying to get a multiple select combobox to save to a SharePoint list choice field. The combobox is populated from another SharePoint list and I would like these values stored in the choice field on my existing SharePoint list.
How to auto populate combobox values based on another combobox selected value. Please help me. I have two lookup fields.for example, If we select A in lookup1 then lookup2 should auto populate whith apple which is one of the option in lookup 2 .
Mr. you saved my life haha
Awesome 👏
Is there a way to say for text? instead of two dropdowns, I have Combobox and a search bar, and I want to do something similar so I can filter using both, but I can't figure out the right way of structuring the formula.
Hi Shane,
Recently I noticed that every time I create a new canvas app the forms will use Cambo boxes while in the past they used dropdowns. is this part of a new update/ layout power apps is pushing? if Yes how can we revert back to the old design?
Thank you in advance for your help.
I am not sure. 😑
Hi Shane, how do you reset a combo box while also setting it's defaultselecteditem to gallery.selected.column.
I want to use the combo box to save new data and update at the same time
Awesome video Shane I learned a couple of really cool stuff from this video!
I have a question, how can I use the Combo Box and New Form thus when I type the name in the Combo Box, it shows me the record in Edit Mode Form?
Thanks for your help!
You would want to set the Item property of the form to be the ComboBox.Selected assuming they both were usign the same data source