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 Text Input...
Power Apps
Unanswered

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

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard