cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hsfournier
Helper I
Helper I

Label Won't Show Filtered Result

I'm pretty sure the issue I am having is because my Session column, in Sharepoint is set as a number. But I have tried a ton of things and I can get the information to show. Here is my code in the Text property of my label. 

 

If(
!IsEmpty(cmbAttendees.SearchText),
$"Sessions Attended " & Concat(
Filter(
colRWAR,
cmbAttendees.Selected.Result in 'Applicant Name'
). Session,
", "
),
""
)

 

This is what I get

hsfournier_0-1664493435521.png

As you can see the commas for the 3 sessions attended are there, but not the numbers of the session.

 

Any help would be appreciated.

 

Heidi

 

1 ACCEPTED SOLUTION

Accepted Solutions

Yay! Got it to work:

 

If(
!IsEmpty(cmbAttendees.SearchText),
"Session(s) Attended: " & Concat(
Filter(
colRWAR,
cmbAttendees.Selected.Result in 'Applicant Name'
). Session,
Text(Session),
", "
)
)

View solution in original post

6 REPLIES 6
RandyHayes
Super User
Super User

@hsfournier 

IsEmpty is used to determine the state of a record

What you want is the IsBlank function.

Also, your syntax is a bit off on the Concat function.  And, one other thing, the use of the $ is not relevant in your formula because you are not using inline information (i.e. there are no { } designations).

 

Please consider changing your Formula to the following:

If(!IsBlank(cmbAttendees.SearchText),
    "Sessions Attended " & 
      Concat(Filter(colRWAR, cmbAttendees.Selected.Result in 'Applicant Name'), Session, ", ")
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
SudeepGhatakNZ
Resident Rockstar
Resident Rockstar

Are you able to investigate

Filter(
colRWAR,
cmbAttendees.Selected.Result in 'Applicant Name'
)

in the designer session like this?

SudeepGhatakNZ_0-1664494080776.png

 

 

That should tell you where you are going wrong

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

Sorry for the late reply, I was out of town. When I use the code you suggested I get an error

hsfournier_1-1664993081951.png

 

When I select just the Filter(colRWAR, cmbAttendees.Selected.Result in 'Applicant Name').Session, I can see the results.

hsfournier_0-1664992890710.png

in the designer, but nothing shows in the label.

hsfournier_2-1664993478357.png

So I am still stumped. 

Yay! Got it to work:

 

If(
!IsEmpty(cmbAttendees.SearchText),
"Session(s) Attended: " & Concat(
Filter(
colRWAR,
cmbAttendees.Selected.Result in 'Applicant Name'
). Session,
Text(Session),
", "
)
)

RandyHayes
Super User
Super User

@hsfournier 

Your formula still is incorrect!

IsEmpty on a text value is not going to give you an accurate result.

 

The formula should be:

If(!IsBlank(cmbAttendees.SearchText),
    "Sessions Attended " & 
      Concat(Filter(colRWAR, cmbAttendees.Selected.Result in 'Applicant Name'), Text(Session), ", ")
)

 

The error you had before was because I was not aware that your Session column was numeric.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi Randy,

 

Thanks for the feedback, I finally got it working by changing the cmbAttendees from cmbAttendees.SearchText (which I think was why the isEmpty was working) to cmbAttendees.Selected.Result.

 

If(!IsBlank(cmbAttendees.Selected.Result) ,
"<b>Signed Up For Session(s) Number: " & Concat(Filter(colRWAR,cmbAttendees.Selected.Result in 'Applicant Name'), Text(Session), ", "),
""
)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,205)