cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
Level 8

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
Super User

Re: Concatenate Free Text field (User imput)?

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"?

 

simms7400
Level 8

Re: Concatenate Free Text field (User imput)?

Hi!

Yes same box as Brand Name
Community Support Team
Community Support Team

Re: Concatenate Free Text field (User imput)?

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
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,141)