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


>