Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Concatenate multiple column values plus ID to create a new column value during new record

I'm trying to create a unique string that looks like this USA/F/IT&CL/100345.

I.e., (country code) / (foreign or domestic) / (department) / (series, planning to use the ID value)


This "number" needs to be created at the time the new record is created, in the 'Asset Tag" column, based on the values selected in other fields.


Where I'm getting stuck is where to do the concatenation?

And, if the record is new, how do I get the ID for the series number?


Thank you for any assistance!


Cheers, James


Accepted Solutions

@JamesNaylor Patch needs the datasource and the record that you want to modify. For syntax, see here,

View solution in original post

Super User
Super User

@JamesNaylor If you are using SubmitForm() to create the new record, you can use the LastSubmit to get the ID of the last submitted record and then use it to create your string.


That sounds promising, thank you.

I'll keep you posted.

Regular Visitor


I can't find LastSubmit. Is it a property or a function?

Also, when and where would I use it? 


For testing I've tried the following command line on the form's 'OnSuccess' property. Although the record is added the 'Asset Tag' column doesn't get updated.


Patch('VS Asset Tags (tablet source)',Defaults('VS Asset Tags (tablet source)'),{'Asset Tag':"james"})

@JamesNaylor It's a function. After you submit the Form, in the OnSuccess property of the Form, you can do something like, yourForm.LastSubmit.ID

Regular Visitor

Thank you CNT...Funny, document search didn't find it.


I understand the approach, i.e., frmTagEntry.LastSubmit.ID returns the record ID...thank you for this tip.


But I'm stuck trying to simply update the field "Asset Tag", for the record just added.


I tried Patch({'Asset Tag': "12345"}) on the form's OnSuccess property, but no joy.

I'm struggling to find an example of updating a column of a record.

Any tips?

@JamesNaylor Patch needs the datasource and the record that you want to modify. For syntax, see here,

Regular Visitor

Yes, I know what you're saying...I was just trying one of the examples from the docs.

"Patch( { Name: "Contoso", Phone: "1-212-555-1234" }, { Name: "Contoso", Location: "Midtown" } )"


But thanks to you I finally worked it occurred to me that LastSubmit would bring the focus to the record I just created for Patch to work on.


Thank you very much for your assistance!


Helpful resources

Ignite 2022


Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,439)