Power Apps Combo Box DefaultSelectedItems
Ғылым және технология
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
Пікірлер: 317
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.
@ShanesCows
23 күн бұрын
Awesome, glad to help. 😎
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
Saved my life on that comma-delimited source... Appreciate your videos man! Life saver!
Looking under the hood like this is always expands my understanding. Thank you.
@ShanesCows
3 жыл бұрын
That was my hope. 😍
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!!!!
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 !
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”
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!!
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.
@ShanesCows
2 жыл бұрын
That is awesome 😎
Thank you for going the extra mile! Those are the videos that help! Anyone can be basic!
@ShanesCows
2 ай бұрын
You are so welcome!
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.
@ShanesCows
Жыл бұрын
Awesome! Thank you!
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!
seriously you are a life saver! this turorial gave the idea how I should go with this defaultSelectedItems. thanks!
@ShanesCows
3 жыл бұрын
Awesome! 🐶
Excellent video. Concise, yet thorough, as usual.
@ShanesCows
2 жыл бұрын
Much appreciated!
When I have an issue I almost always end up at your videos! I just need to start coming here first :)
@ShanesCows
3 жыл бұрын
You do. 😜 Glad to help.
Hours of looking on Microsoft's documentation and you salved my problem in 5 minutes. Well done!
@ShanesCows
3 жыл бұрын
Awesome 😎
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!
@ShanesCows
2 жыл бұрын
Glad you got it. 😊
Shane thanks for all your videos, you keep me inspired on learning new stuff, you're my idol :) !
@ShanesCows
3 жыл бұрын
Happy to hear that!
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!!
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😍
@ShanesCows
11 ай бұрын
Glad I could help
Great video. Exactly what I was looking for. Keep up the awesome work.
@ShanesCows
9 ай бұрын
Glad it helped!
@IamSanjayPersad
9 ай бұрын
@@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: "" }
Fun to watch learning at the same time. Thanks a lot!
@ShanesCows
3 жыл бұрын
Glad you enjoyed 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.
@ShanesCows
10 ай бұрын
Glad I could help, I hope your head doesn't hurt too bad. :)
Wow what a great tricks. You alway teach me new thing. Thank you so much Shane
@ShanesCows
3 жыл бұрын
Glad you enjoyed it!
Shane, you are very good, you saved me again.
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)"
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
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
@ShanesCows
2 жыл бұрын
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. 😊
Thank you for another great video Shane.
@ShanesCows
Жыл бұрын
Glad you enjoyed it
You are a true life saver. Thanks mate 👍👍👍👍👍👍 More thumbs up 👍👍👍👍👍 Thx
@ShanesCows
Жыл бұрын
Glad it helped
THANK YOU! Excellent, easy to understand, to the point!
@ShanesCows
Жыл бұрын
Happy to help. Have a great day. 🐶
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!
@ShanesCows
2 жыл бұрын
Awesome!
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 🤦♂️🤦♂️🤦♂️
@ShanesCows
2 жыл бұрын
Glad to help Frank.
You did so much heavy lifting buddy kudos to you. Awesome job, Thanks a lot !!!!
@ShanesCows
Жыл бұрын
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)
Perfect. Just when I needed it as well.
@ShanesCows
3 жыл бұрын
Awesome
Thank you for this video. you are awesome Shane!
@ShanesCows
2 жыл бұрын
My pleasure!
Pure spun gold, Shane
@ShanesCows
10 ай бұрын
Thanks Carlos!
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.
@ShanesCows
3 жыл бұрын
Thanks for the support. 🐶 We will take your once and appreciate it.
thanks for the tip about the split function and the renaming the column from result to Value
@ShanesCows
Жыл бұрын
Glad it helped!
Thanks! Makes sense now on the combo defaults.
@ShanesCows
2 жыл бұрын
Happy to help. Have a great day. 🐶
Thanks Shane, you are the best!!!!!!
@ShanesCows
3 жыл бұрын
Thanks 🙏
Thanks a ton for this video! Helped a lot!
@ShanesCows
10 ай бұрын
You're welcome!
AT 8:14 I saw the Light! Thanks Shane!
@ShanesCows
3 жыл бұрын
Awesome Lance. Hope all is well. 😎
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
@ShanesCows
2 жыл бұрын
Awesome. Makes my day when someone understands the deeper concept then just the answer. Good job! 🐶
You read my mind with this issue Shane! Multi Select filter to Multi Select!
@ShanesCows
3 жыл бұрын
Awesome
This is very usedfull information, thank for sharing.
@ShanesCows
2 жыл бұрын
Happy to help. Have a great day. 🐶
Thank you for your contribution. I was struggling with the combo box and was looking for some help
@ShanesCows
3 жыл бұрын
You are welcome!
Thanks, my problem was whith record value and I could not understand the problem, you video was was amazing for me.
@ShanesCows
2 жыл бұрын
You're welcome!
Thank you. Very usefull video
Thank you Shane!
@ShanesCows
3 жыл бұрын
Glad to help 😀
Awesome video!
@ShanesCows
Жыл бұрын
Happy to help. Have a great day. 🐶
Shane, thank you very much, I mean really MUCH ;-) I spent so much time on this apparently easy thing. …
Thank you so much Shane
@ShanesCows
Жыл бұрын
You are very welcome Dre.
You solved my issue..thank u so much
@ShanesCows
3 жыл бұрын
Awesome! 🤩
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!
@ShanesCows
8 ай бұрын
I wish I knew, I wish I knew. 🥲
Really awesome... thanks for this video... it was very useful for me... :)
@ShanesCows
Жыл бұрын
Most welcome 😊
O meeen this really valuable video
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.
Thank you again for saving me from losing more hair.
@ShanesCows
3 жыл бұрын
Of course! 🐶
Thank you for this video
@ShanesCows
2 жыл бұрын
My pleasure
Truely, Thank you
Looking Fresh Shane.. ;)
@ShanesCows
3 жыл бұрын
Thanks 🤩
Thank you sir!
@ShanesCows
2 жыл бұрын
Glad to help. 😀
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!
@ShanesCows
3 жыл бұрын
Perfect 👌
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?
Brilliant!
@ShanesCows
3 жыл бұрын
You are too Kind Louis! 🙌
It took me a couple of days to realize about this, combo boxes are amazing but sometimes are strange
@ShanesCows
3 жыл бұрын
Combo Boxes do what Combo boxes want to do 😂
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?
Thank you, I wish the powerapps docs had more example of how to use the various controls
@ShanesCows
3 жыл бұрын
😊 more is always better
YEEEESSSS!!!!!! Thank you thank you!!!!!!!
@ShanesCows
2 жыл бұрын
You're welcome!!
Saved my life :)
@ShanesCows
Жыл бұрын
Happy to help 😎😎
You are a life save, spend hours on this before watching the video.....done now ;-)
@ShanesCows
3 жыл бұрын
Awesome 😎
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.
@ShanesCows
3 жыл бұрын
On change can cause loopiong. Maybe force the user to press a button to do the save instead of OnChange?
@jnotbusch
3 жыл бұрын
he did a very good video on changing just one record in a gallery and saving/updating it.
nice one Shane
@ShanesCows
Жыл бұрын
Thanks Max
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..? :)
Thanks Shane
@ShanesCows
2 жыл бұрын
Happy to help. Have a great day. 🐶
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.
Thanks!
@ShanesCows
Жыл бұрын
Appreciate the support. 😎
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...
Great explanation, I have a collection of persons, I need to select default all the persons. Thanks.
@ShanesCows
3 жыл бұрын
Glad it was helpful!
Mr. you saved my life haha
@ShanesCows
3 жыл бұрын
Awesome 👏
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!
Hi Shane, I'm loving your videos and they help a lot. Could you please help me understand how to pass a global variable into a combobox in a new form. So if I click from a Gallery onto a new page to add a record (1 to many for recording notes on a task), how do I pass the primary key into the notes form with foreign key. Thank you
EXCELLENT ! And I seldom use the capital letters 😃
@ShanesCows
10 ай бұрын
Happy to help. Have a great day. 🐶
great video Shane, quick question, how would i go about default a value from a listgroupmembers connection for the selected item from the gallery?
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?
@alistairmonro
2 жыл бұрын
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
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.
@ShanesCows
3 жыл бұрын
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.
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 ?
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!
@ShanesCows
3 жыл бұрын
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
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.
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?
@DavidShaw-dc4re
Жыл бұрын
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
Thanks for the good info! What about add "ALL" be the first item in the combobox list?
Hi Shane, Could you please make a video on below scenario Autocheck check boxes based on the value in another field, check box items are coming from SharePoint list column
Hey man thanks for the video. Can you make the video about setting default selected item for a combobox that is an Office 365 User Search then patching it to sharepoint?
Great video - thanks🤩 will it work the same way if your source is peoplepicker connection? Let’s say I have gallery of projects. Within the form accessed from the gallery, I select the project team from O365 connection. Going back and forth between projects, will I be able to set the default selected team?
@ShanesCows
3 жыл бұрын
Yes, as long as the table matches it will be happy. 😊
Hi Shane, thanks for this. All your examples here works when the app is online, I was even using a collection and works just fine. But not if the app is offline. Any ideas or tips about this? Thanks