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 / Concatenate Text Input...
Power Apps
Answered

Concatenate Text Input and combo box

(0) ShareShare
ReportReport
Posted on by 270

Hello,

 

Struggling to get this to work.

 

I have a text input and a combo box - I would like to Concatenate the value the user types in the TextInput and what they select in the combo box, but I would like to have some logic, if the user has already entered "User1 (football)" in the text input then there is nothing to Concatenate.

If the user typed in "User1" in the text input then the Concatenate function should combine the value found in TextInput ("User1") and combo box selection of "Cricket" and combine the values together

 

 

Categories:
I have the same question (0)
  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @PowerAGuy 

     

    Roughly something like below. Replace the "#" with space or maybe a comma.

     

    If(TextInput.Text = 'User1',
     Concatnate(TextInput.Text,Concat(ComboBox1.SelectedItems,Value,"#")),
     TextInput.Text
    )

     

     


      ✔️
    Just in case my response helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

     

      🔗
    🕸bistek.space  🐦 @cha_bistek  📺 @BisTekSpace 
  • LaurensM Profile Picture
    12,516 Moderator on at

    @PowerAGuy 

    Is football just an example and should this also be valid for other cases?

    If you want to check whether the dropdown value is already in the text input try the code below:

    If(
     Dropdown1.Selected.Value in TextInput1.Text,
     TextInput1.Text,
     Concatenate(TextInput1.Text, " ", Dropdown1.Selected.Value)
    )


     I hope this helps!

  • PowerAGuy Profile Picture
    270 on at

    But the user wont be typing User1, it was an example.... it could be anything in the text input 

  • PowerAGuy Profile Picture
    270 on at

    Thanks @LaurensM 

    Yes, the Football value is just an example. 

     

    Can I place the code you have mentioned in the text input default property, or does it need to go on a buttons OnSelect?

     

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @PowerAGuy,

    This would go on the OnSelect of the button you use to save or patch the data.
    For example: 

     

    Patch(DataSource, Defaults(DataSource), {FieldName: If(
     Dropdown1.Selected.Value in TextInput1.Text,
     TextInput1.Text,
     Concatenate(TextInput1.Text, " ", Dropdown1.Selected.Value)
    )})

     


    If the answer solved your question, would you be so kind as to accept it as a solution.
    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 538

#2
WarrenBelz Profile Picture

WarrenBelz 420 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard