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

Concatenating inputs

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Concatenating inputs

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: Concatenating inputs

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 

Highlighted
Super User
Super User

Re: Concatenating inputs

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Highlighted
Regular Visitor

Re: Concatenating inputs

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

Highlighted
Super User
Super User

Re: Concatenating inputs

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (5,278)