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 / Make a label's visible...
Power Apps
Answered

Make a label's visible property ignore blanks

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi there,

 

I have 5 drop downs from which options can be selected. However, user's must not choose the same drop down and duplicate answers for any of the 5 choices - they must all be different. 

 

This is the current formula I use which works:

 

If(paProject1.Selected.Name = paProject2.Selected.Name,true,false) Or If(paProject1.Selected.Name = paProject3.Selected.Name,true,false) Or If(paProject1.Selected.Name = paProject4.Selected.Name,true,false) Or If(paProject1.Selected.Name = paProject5.Selected.Name,true,false) Or If(paProject2.Selected.Name = paProject3.Selected.Name,true,false) Or If(paProject2.Selected.Name = paProject4.Selected.Name,true,false) Or If(paProject2.Selected.Name = paProject5.Selected.Name,true,false) Or If(paProject3.Selected.Name = paProject4.Selected.Name,true,false) Or If(paProject3.Selected.Name = paProject5.Selected.Name,true,false) Or If(paProject4.Selected.Name = paProject5.Selected.Name,true,false)

 

If there are duplicate choices, the submit button is disabled and a label becomes visible saying 'You have duplicate projects, please adjust'

 

However, user's also have the ability to leave drop downs blank. For example, if they only want to choose 2 projects, 3 are left blank. This is now an issue as they cannot submit because it thinks the blanks are duplicates.

 

Does anyone know of a formula to use so that duplicate entries are disabled, but if the duplicate entries are blanks, they are ignored and the label is not visible.

 

I have tried a few If(IsBlank, however not had much luck.

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    @Anonymous this is a very long If statement an will become even longer when adding the IsBlank() functionality.

     

    Are the projects chosen in order? (first 1 then 2...)
    If so, you could replace this statement by filtering the items of each dropdown and removing the previously chosen item:

    Project 1
    Datasource
    
    Project 2
    Filter(Datasource, NameField <> DropDownProject1.Selected.NameField)
    
    Project 3
    Filter(Datasource, NameField <> DropDownProject1.Selected.NameField && NameField <> DropDownProject2.Selected.NameField)


    I hope this helps!

  • Verified answer
    victorcp Profile Picture
    2,350 Moderator on at

    Hi,

    I've thought about a different way of doing the same.

    Firstly I created an array (Items) with all the selected Names and then count how many times it appears in the array, but if it is empty it will skip it.

    With(
     {
     Items:[paProject1.Selected.Name,paProject2.Selected.Name,paProject3.Selected.Name,paProject4.Selected.Name,paProject5.Selected.Name]
     },
     (CountRows(Filter(Items, Value = paProject1.Selected.Name))>1 && !IsBlank(paProject1.Selected.Name)) ||
     (CountRows(Filter(Items, Value = paProject2.Selected.Name))>1 && !IsBlank(paProject2.Selected.Name)) ||
     (CountRows(Filter(Items, Value = paProject3.Selected.Name))>1 && !IsBlank(paProject3.Selected.Name)) ||
     (CountRows(Filter(Items, Value = paProject4.Selected.Name))>1 && !IsBlank(paProject4.Selected.Name)) ||
     (CountRows(Filter(Items, Value = paProject5.Selected.Name))>1 && !IsBlank(paProject5.Selected.Name))
    )

     

    I hope it helps 🙂

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Amazing! This works. Thank you so much.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This works great too and is a cool feature. Thank you.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard