cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate II
Advocate II

Update another Sharepoint list column using ID on insert

HI. I am trying to build my first Flow in order to automatically create a reference number for new records added to a Sharepoint list. I wanted to use the autonumbering ID field and prefix it with a fixed text value and preceding zeros. For the moment I'm just trying to build an expression to concatentate the text prefix and the ID field value as follows:

 

concat("ABC",string(triggerBody()?['ID']))
but I just get an invalid syntax error. I'm clearly getting something fundamental wrong here but I've not found a good example to guide me past this point so far.
 
Can anyone explain what I'm doing wrong here?
 
 
1 ACCEPTED SOLUTION

Accepted Solutions
Memorable Member
Memorable Member

Hi @biterbit 

 

Looking at your expression, you cannot use double quotes to wrap a string; you have to use single quotes. Second, you don't need to convert the ID column to a string; Flow will use the ID value in a Concat() expression. This is how the expression looks like on a test I just ran:

concat('ABC', triggerBody()?['ID'])

This is a screenshot of the outcome:

concat.PNG

Please try this out when you have a chance and let me know.

 

Regards,

Fausto Capellan, Jr

Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

View solution in original post

3 REPLIES 3
Memorable Member
Memorable Member

Hi @biterbit 

 

Looking at your expression, you cannot use double quotes to wrap a string; you have to use single quotes. Second, you don't need to convert the ID column to a string; Flow will use the ID value in a Concat() expression. This is how the expression looks like on a test I just ran:

concat('ABC', triggerBody()?['ID'])

This is a screenshot of the outcome:

concat.PNG

Please try this out when you have a chance and let me know.

 

Regards,

Fausto Capellan, Jr

Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

View solution in original post

Thanks Fausto. I knew it would be something simple. It's always the punctuation that catches me out when working with new languages.

I completely agree with you. Being a developer, I know to wrap strings in double quotes by default and then coming into Flow and just use single quotes, was a slight adjustment. But once you do it a few times, everything falls into place.
By the way, if my post helped you, please accept it as a solution in the event a new Flow user runs into the same thing.

Regards,
Fausto Capellan, Jr
Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (9,482)