Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Bold and color a single item in a combo box list and fix to either top or bottom of list

(0) ShareShare
ReportReport
Posted on by 634

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?

 

bold list item.png

 

Categories:
  • WarrenBelz Profile Picture
    146,596 Most Valuable Professional on at
    Re: Bold and color a single item in a combo box list and fix to either top or bottom of list

    Thanks @Future_Vision ,

    The one that helped you the most is probably best - this closes the item and makes it easier for others to find in the future.

  • Future_Vision Profile Picture
    634 on at
    Re: Bold and color a single item in a combo box list and fix to either top or bottom of list

    😀🌴

    I have no idea which answer to mark as the correct one since it seems like I had the right code the whole time. So odd that it would fail randomly and then start working.

  • WarrenBelz Profile Picture
    146,596 Most Valuable Professional on at
    Re: Bold and color a single item in a combo box list and fix to either top or bottom of list

    @Future_Vision ,

    That proves that there should be a table in the field 

    newThird.'Third Party (cr9c7_thirdparty)'

    which should align with the same type of field in your combo box. As you have it working now, no reason to touch it further.

     

    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.

  • Verified answer
    Future_Vision Profile Picture
    634 on at
    Re: Bold and color a single item in a combo box list and fix to either top or bottom of list

    This is odd. When I switch the sorting code on the combobox back to the code below(the original code which at one time worked) everything works now - The combobox updates with the text field submission and the sorting works. 

     

    Sort('Third Parties','Third Party (cr9c7_thirdparty)',Ascending)

     

    What ls odd is that even though this code worked before it stopped working even though it was essentially identical to what is being used in another part of the form. The comobox box in that part of the form sorted correctly AND updated with the submitted value from a similar textbox/button combination. 

     

    Why it now works is beyond me. I've had this experience with other functionality as well. It works. Then breaks. Then starts working again.

  • WarrenBelz Profile Picture
    146,596 Most Valuable Professional on at
    Re: Bold and color a single item in a combo box list and fix to either top or bottom of list

    @Future_Vision ,

    That is what I thought - as mentioned I was only testing a possibility.

    Did you do the second exercise - you really need to find the correct value of the data to be put in the combo box.

  • Future_Vision Profile Picture
    634 on at
    Re: Bold and color a single item in a combo box list and fix to either top or bottom of list

    If I drop that in a label I get:

    'Name isn't valid. This identifier isn't recognized.'

  • WarrenBelz Profile Picture
    146,596 Most Valuable Professional on at
    Re: Bold and color a single item in a combo box list and fix to either top or bottom of list

    @Future_Vision ,

    Firstly, there is a bracket missing (it is in your field name)

    {'Third Party (cr9c7_thirdparty)':newThird.'Third Party (cr9c7_thirdparty)'.Value}

    I was also looking at your screen shot and it appeared that your table could have been multilevel. You will get an error if it is not. The syntax is correct in the DefaultSelectedItems {ComboBoxFieldSelected:Table/Collection.FieldName}. You just have to refer to the second bit correctly. If you put this in a label

    First(newThird).'Third Party (cr9c7_thirdparty'

    do you see any value in it?

     

    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.

  • Future_Vision Profile Picture
    634 on at
    Re: Bold and color a single item in a combo box list and fix to either top or bottom of list

     Is there a typo in your code? I've tried a few iterations of it and ultimately I get a either a 'Name isn't valid. This identifier isn't recognized' or 'Invalid use of '.' '

     

    Could the problem be that the combobox is refreshing after setting the DefaultSelectedItems?

  • WarrenBelz Profile Picture
    146,596 Most Valuable Professional on at
    Re: Bold and color a single item in a combo box list and fix to either top or bottom of list

    @Future_Vision ,

    Try

    {'Third Party (cr9c7_thirdparty)':newThird.'Third Party (cr9c7_thirdparty'.Value}

     

    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.

  • Future_Vision Profile Picture
    634 on at
    Re: Bold and color a single item in a combo box list and fix to either top or bottom of list

    Right. That is what I thought my image was showing. First image below shows the field selected that uses newThird as the DefaultSelectedValue. The second image is from looking at Variables.

     

    newThird (1).pngnewThird2.png

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,596 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard