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

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

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

@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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,182)