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 / How to concatenate tex...
Power Apps
Unanswered

How to concatenate text from form fields into output field and hide fields that are not filled in

(0) ShareShare
ReportReport
Posted on by 11

I hope this makes sense. 

Let's say we have a form on a screen where the user fills in the fields but if they don't fill in certain fields like "Alternate contact name", then PowerFx just omits that from the output. Here is sample code and screenshot of what I mean: 

ROmen_0-1691022231119.png

 

 

Concatenate("Daytime Contact's Name: ", inpPrimaryName_1,"
Daytime Contact's Telephone #: ", inpPhone_1,"
Daytime Contact's eMail: ", inpPrimaryEmail_1,"
Daytime Contact's Working Hours: ", inpWorkHours_1,"
Alternate Daytime Contact's Name: ", inpAltContactName_1,"
Alternate Daytime Contact's Telephone #: ", inpAltContactNum_1, "
Alternate Daytime Contact's eMail: ", inpAltEmail_1, "
Alternate Daytime Contact's Working Hours: ", inpAltHours_1,"
"
)

 

Categories:
  • narayan225 Profile Picture
    2,547 Moderator on at

    @R-Omen 

     

    You can use if condition to remove if blank.

    If(inpPrimaryName.Text,Concatenate("Daytime Contact's Name",inpPrimaryName.Text))
    //if the input control contains data, it will show the information, if not nothing happens

    This is a sample, you will need to convert your formula to work accordingly.

    Hope this helps.

     

    Cheers!

  • R-Omen Profile Picture
    11 on at

    Thanks, but I try it and nothing seems to happen, even when I enter text into the alt name field. The literal code I tested with was: 

    If(inpAltContactName_1.Text,Concatenate("Alternate Daytime Contact's Name: ", inpAltContactName_1.Text))

     This was after I first was trying to figure out how to even make sure the primary name field was included above and then add this as an extra line below it. If you could explain how to force the Primary Name fields to show and then add the Alt Name text optionally, that would be great!

  • narayan225 Profile Picture
    2,547 Moderator on at

    @R-Omen 

    Please try the following.

    If(Not(IsBlank(TextInput1.Text)),Concatenate("Alternate Daytime Contact's Name: ",TextInput1.Text))

    Cheers!

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 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard