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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Concatenate, but skip ...
Power Apps
Answered

Concatenate, but skip over blank value

(0) ShareShare
ReportReport
Posted on by

Hello - 

I'm looking to concatenate the values from a selected record from 5 columns: 

Address

Address2

City

State

Zip

So that when the formula is executed, I have something like this: Address, Address2, City, State Zip

Here is the formula that I've written 

Concatenate(varSelectedLoc.Address,", ",varSelectedLoc.Address2,", ",varSelectedLoc.City,", ",varSelectedLoc.State," ",varSelectedLoc.Zip)
Address2 often has a blank value in my table, but not in every situation.  Is there any way that this formula can be amended to skip over the blank value so that I still come up with something like this: Address, City, State Zip?
Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @jessicadduffey,

     

    If only Address2 may sometimes be empty, you could use the following approach:

    $"{varSelectedLoc.Address}, {If(!IsBlank(varSelectedLoc.Address2), varSelectedLoc.Address2 & ", ")}{varSelectedLoc.City}, {varSelectedLoc.State}, {varSelectedLoc.Zip}"

    In this case we use string interpolation to improve readability and use an If statement to only display Address2 when it has a value. (I have also added a comma between State and Zip.)

     

    If we expect multiple fields to possibly be empty, we may need a more dynamic approach.

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard