cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Concatenate Free Text field (User imput)?

Hi Folks - I have a field called "Brand Name" that needs to be concatenated with another field is the other field is not blank. Brand Name is also free text and user input, which makes it tricky. I have the following code: 

 

If( Not( IsBlank(DataCardValue36.Text) ),Concatenate(ThisItem.Brand_x0020_Name,"(",DataCardValue36.Text,")"), ThisItem.Brand_x0020_Name )

But it just keeps over writing the "Brand Name" field with the other value all together. Is there a way to do this? Or do I need to make an intermeidary "Brand Name" property to do this? Thanks!

3 REPLIES 3
Super User III
Super User III

Hi @simms7400 

Just to clarify, where exactly are you using this formula?

Are you trying to display the concatenated value in a label, or are you trying to display this concatenated value in the same text entry box where the user enters the "brand name"?

 

Hi!

Yes same box as Brand Name
Community Support
Community Support

Hi @simms7400 ,

Do you want to display this concatenated value in the same text entry box where the user enters the "brand name"?

 

Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs. As an alternative solution, please take a try with the following workaround:

Set the OnChange property of the "Brand Name" Text Box to following (this property would be fired when only move your mouse focus from the "Brand Name" Text Box to other place in current screen😞

UpdateContext({ShowVar: false});
If(
   !IsBlank(DataCardValue36.Text),
   Set(ConcatenatedValue, Concatenate(BrandNameTextBox.Text, "(", DataCardValue36.Text, ")")),
Set(ConcatenatedValue, BrandNameTextBox.Text) ) UpdateContext({ShowVar: true});

Set the Default property of the Brand Name Text Box to following:

If(
   ShowVar = true,
   ConcatenatedValue
)

 

Set the OnVisible property of the current screen to following:

UpdateContext({ShowVar: false});

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,851)