Notifications
Announcements
Here is what I am looking to do. If a user selects 'Add Product' from the combo box list shown below and text field appears along with an 'Add' button. This is to allow the user to add a new product to the list. What I would like to do is differentiate this list item from the others. I'm thinking making it bold, changing the color and positioning it at either the top or bottom(probably top) of the list (which will be sorted alphabetically) would be the way to go. Is this possible?
@Future_Vision ,
You can certainly sort alphabetically - what are the Items of the Combo Box?
You cannot however make one item appear different form the others (font/bold).
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
That's what I was thinking. Alphabetical but I added '**' to the front and end of the AddProduct like this '** Add Product **'. That worked in one case but in another case any new items I added to the list would sort to the top. Almost like they were keying off some other value when sorting alphabetically. Any ideas why that would happen?
Can you please supply the Items of the Combo Box and I may have some idea.
This is just one example. I've had added other values in this combo box using a Patch to the datasource and they always get pushed to the top on the combo box refresh.
3rd Party 1** Add 3rd Party **3rd Party test
Here's a little more info I found out as I've tested more. The items I add do sort alphabetically but above the ** Add 3rd Party ** item. If I change to descending I get it flipped:
3rd Party test** Add 3rd Party **3rd Party 1
...
additional items in descending alphabetical order
You still have not provided the Items (your exact code) for the combo box.
Pretty simple.
Sort('Third Parties','Third Party (cr9c7_thirdparty)',Ascending)
Try this
Sort( 'Third Parties'.'Third Party (cr9c7_thirdparty)', 'Third Party (cr9c7_thirdparty)', Ascending )
This works but it now breaks my DefaultSelectedItems functionality. Here's a little background on what happens.
This is the code I used on the button
UpdateContext({newThird:Patch('Third Parties', {'Third Party (cr9c7_thirdparty)':'Add 3rd Party TB'.Value})});Reset('Add 3rd Party TB')
The code in the DefaultSelectedItems is
newThird
It works without the sort code you provided but once I add the sort code it breaks this functionality
Without getting into your other logic, the DefaultSelectedItems for the Combo Box when using the Items supplied would normally be
{'Third Party (cr9c7_thirdparty)':ThisItem.'Third Party (cr9c7_thirdparty)'}
It is a complex field type and you need to specify which "part" of the field needs to display and what to display in it, so maybe this is what you need
{'Third Party (cr9c7_thirdparty)':newThird.'Third Party (cr9c7_thirdparty)'}
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268