web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding Stars (*) to Code
Power Apps
Answered

Adding Stars (*) to Code

(2) ShareShare
ReportReport
Posted on by 148

Hi,

 

I want to be able to display just Stars (*) in the box which currently enters the prefix letter values via Dropdowns, so when nothing is selected I want the Code to just say HWT-**************. As soon as you select the value from the dropdown the * should change to the selected prefix letter from the Dropdown.

 

Hnasir1231_0-1639484519124.png

 

Also, I want to have a refresh button, so when I have selected the desired options, I want to be able to click the refresh button and clear the dropdowns.

 

 

Thank you.

Categories:
  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    1. This is definitly possible with some if logic and IsBlank. Are you able too share with me the names of the relevant components.

     

    e.g. Dropdown1 is the name of the dropdown that if has value it populates if its empty i want stars

    2. for the reset feature/refresh this is quite a good feature. to do this you need to have a refresh icon or button and in the OnSelect add Reset(Dropdown1) and it will reset them if you have loads you can use concurrent to make it work faster

     

    If you give me the names of all of them even screenshot is fine i can help write out what you need

     

  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    An example of what you want in your box using made up names for the components is this:
    Dropdown1.Selected.Value&"-"&If(!IsBlank(Dropdown2.Selected.Value),Dropdown2.Selected.Value,"************")

    if you send me the names i can tweek it to match

  • Hnasir1231 Profile Picture
    148 on at

    @AJ_Z 

     

    Dropdown_BM

    Dropdown_BBBSize

    Dropdown_LN

    Dropdown_H

    Dropdown_B

    Dropdown_GB

    Dropdown_Base

    Dropdown_Pfrm

    Dropdown_LC

    Dropdown_ECO

    Dropdown_FP

    Dropdown_TD

    Dropdown_Bdwn

    Dropdown_RA

    Dropdown_Cmp

  • Hnasir1231 Profile Picture
    148 on at

    Hi @AJ_Z 

     

    Please note its not a box, its a label.

  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    Okay so first here is what you need to add into onselect of your refresh button/icon:

    Concurrent(Reset(Dropdown_BM),Reset(Dropdown_BBBSize),Reset(Dropdown_LN),Reset(Dropdown_H),Reset(Dropdown_B),Reset(Dropdown_GB),Reset(Dropdown_Base),Reset(Dropdown_Pfrm),Reset(Dropdown_LC),Reset(Dropdown_ECO),Reset(Dropdown_FP),Reset(Dropdown_TD),Reset(Dropdown_Bdwn),Reset(Dropdown_RA),Reset(Dropdown_Cmp))

     

    Next for your Label which dropdown goes after the prefix?

  • Hnasir1231 Profile Picture
    148 on at

    Hi @AJ_Z 

     

    Exact same order, but the first dropdown will have different Products so it will display like this PSX-ABCDEFGHIJKLM....

     

    But I want the label to display the Stars only for example *-**********....

     

    So, when I select a dropdown the stars should change to the Prefix letters.

     

    Thank you.

  • Hnasir1231 Profile Picture
    148 on at

    Dropdown_BM wont have any Prefix.

     

    But the next dropdowns after the Dropdown_BM will have prefix as they all come after the dash (-)

     

    @AJ_Z 

  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    Apologies @Hnasir1231 I may be a little confused are you asking for the the dropdowns to come together and create a combined string but be a star if blank? if so that would be this:

    If(IsBlank(Dropdown_BM.Selected.Value),"*",Dropdown_BM.Selected.Value)&"-"&
    If(IsBlank(Dropdown_BBBSize.Selected.Value),"*",Dropdown_BBBSize.Selected.Value)&
    If(IsBlank(Dropdown_LN.Selected.Value),"*",Dropdown_LN.Selected.Value)&
    If(IsBlank(Dropdown_H.Selected.Value),"*",Dropdown_H.Selected.Value)&
    If(IsBlank(Dropdown_B.Selected.Value),"*",Dropdown_B.Selected.Value)&
    If(IsBlank(Dropdown_GB.Selected.Value),"*",Dropdown_GB.Selected.Value)&
    If(IsBlank(Dropdown_Base.Selected.Value),"*",Dropdown_Base.Selected.Value)&
    If(IsBlank(Dropdown_Pfrm.Selected.Value),"*",Dropdown_Pfrm.Selected.Value)&
    If(IsBlank(Dropdown_LC.Selected.Value),"*",Dropdown_LC.Selected.Value)&
    If(IsBlank(Dropdown_ECO.Selected.Value),"*",Dropdown_ECO.Selected.Value)&
    If(IsBlank(Dropdown_FP.Selected.Value),"*",Dropdown_FP.Selected.Value)&
    If(IsBlank(Dropdown_TD.Selected.Value),"*",Dropdown_TD.Selected.Value)&
    If(IsBlank(Dropdown_Bdwn.Selected.Value),"*",Dropdown_Bdwn.Selected.Value)&
    If(IsBlank(Dropdown_RA.Selected.Value),"*",Dropdown_RA.Selected.Value)&
    If(IsBlank(Dropdown_Cmp.Selected.Value),"*",Dropdown_Cmp.Selected.Value)

    If that is not what you wanted but you wanted something different could you please explain it again for me alternatively we can call on teams to discuss if needed

     

     

  • Hnasir1231 Profile Picture
    148 on at

    @AJ_Z 

    Hi, This solution is perfect, but instead of the entire value showing on the label. I just want the prefix letter to appear.

     

    The MX is fine. The rest should be ABCDEFGHI... So MX-ABCDEFGHI instead of the actual dropdown display.

     

    Hnasir1231_0-1639571233603.png

     

     

    Thank you.

     

  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    I am a little confused still do you mean you want this which ones make up the prefix 🙂 ?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard