cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
imrineeman
Regular Visitor

Concatenating inputs

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@imrineeman 

You might first want to review the required columns in your data source.  Sounds like a SharePoint datasource since you mention Title, but even if not...review what is required and make sure it is being supplied when creating a new record.

OnSuccess Action:

UpdateIf('SKU Generator - Database', 
          ID=New_Form.LastSubmit.ID,
          {Serialnumber:
                Text(New_Form.LastSubmit.ID, "00000"),
          'Catalog Number':
                ProjectCodeCardValue.Text & Text(New_Form.LastSubmit.ID,"00000") & TypeCodeCardValue.Text
          }
)

 

Note, the ProjectCodeCardValue.Text and TypeCodeCardValue.Text.  This is based on the assumption that these are TextInput controls in your EditForm DataCard.  You need to replace them with the appropriate control name.

OR, if the value of ProjectCode and TypeCode are being recorded in your Submit, then you can change the formula to this (assuming those exact column names)

 

UpdateIf('SKU Generator - Database', 
          ID=New_Form.LastSubmit.ID,
          {Serialnumber:
                Text(New_Form.LastSubmit.ID, "00000"),
          'Catalog Number':
                New_Form.LastSubmit.ProjectCode & Text(New_Form.LastSubmit.ID,"00000") & New_Form.LastSubmit.TypeCode
          }
)

 

BUT - if you are getting a Title required error somewhere, that is a different issue.  Make sure you are populating any required columns with your submit and EditForm.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
Drrickryp
Super User
Super User

Hi @imrineeman 

Concatenate() only works with strings so if you have a number or date field, you have to wrap it with Text() to convert it.  You can use "&" instead to create a string of text, dates and numbers

Set(varSKU, somenumber&somedate&sometext)

The Concatenate function will error if you try to combine text, numbers and dates 

RandyHayes
Super User
Super User

@imrineeman 

You might first want to review the required columns in your data source.  Sounds like a SharePoint datasource since you mention Title, but even if not...review what is required and make sure it is being supplied when creating a new record.

OnSuccess Action:

UpdateIf('SKU Generator - Database', 
          ID=New_Form.LastSubmit.ID,
          {Serialnumber:
                Text(New_Form.LastSubmit.ID, "00000"),
          'Catalog Number':
                ProjectCodeCardValue.Text & Text(New_Form.LastSubmit.ID,"00000") & TypeCodeCardValue.Text
          }
)

 

Note, the ProjectCodeCardValue.Text and TypeCodeCardValue.Text.  This is based on the assumption that these are TextInput controls in your EditForm DataCard.  You need to replace them with the appropriate control name.

OR, if the value of ProjectCode and TypeCode are being recorded in your Submit, then you can change the formula to this (assuming those exact column names)

 

UpdateIf('SKU Generator - Database', 
          ID=New_Form.LastSubmit.ID,
          {Serialnumber:
                Text(New_Form.LastSubmit.ID, "00000"),
          'Catalog Number':
                New_Form.LastSubmit.ProjectCode & Text(New_Form.LastSubmit.ID,"00000") & New_Form.LastSubmit.TypeCode
          }
)

 

BUT - if you are getting a Title required error somewhere, that is a different issue.  Make sure you are populating any required columns with your submit and EditForm.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Thank you, this has worked

 

On another note - can you help me assign the first attached document as the picture in the gallery? I have an image object in gallery and i cant link it to the first attachment on the form

 

Thank you

@imrineeman 

Very good.  Glad it helped!

 

For your other question, I'd recommend that you mark this question as Accepted Solution and post another for your image question.  Provide some examples and screenshots if necessary for the fastest responses.  That way others can gain from your questions and solutions as well.  If you ever want a particular person that you have dealt with (such as myself) to respond, you can @ include them in any post you do.  That way they will get a notification and can check in on your question quickly.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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