cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
biterbit
Level: Powered On

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

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





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


3 REPLIES 3
Highlighted
Super User
Super User

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





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


biterbit
Level: Powered On

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.

Super User
Super User

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




Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 198 members 4,447 guests
Please welcome our newest community members: