cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Solution Sage
Solution Sage

Re: Update another Sharepoint list column using ID on insert

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!

Proud to be a Flownaut!


View solution in original post

3 REPLIES 3
Highlighted
Solution Sage
Solution Sage

Re: Update another Sharepoint list column using ID on insert

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!

Proud to be a Flownaut!


View solution in original post

Highlighted
Advocate II
Advocate II

Re: Update another Sharepoint list column using ID on insert

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

Highlighted
Solution Sage
Solution Sage

Re: Update another Sharepoint list column using ID on insert

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!

Proud to be a Flownaut!


Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (10,756)