cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

I have an error InvalidTemplate when updating a list in sharepoint

I followed this tutorial http:/ /www. c-sharpcorner. com/article/how-to-auto-increment-an-existing-column-in-sharepoint-online-o365-using-flow/

 

And it worked, my purpose was to generate consecutive ID in a string, that is: AAA-001, AAA-002. 

Now, it just shows an error like this:

 

Captura10.JPG

 

My list have a column "Porcentaje" with styles, of type Numeric, I suspect that column may be, 
but I have no idea what else it can be. Yesterday, for example, it worked well

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Isatol,

 

Could you please share a screenshot of your flow's configuration?

Could you please show a bit more about your SharePoint list? Which column is filled with the generate consecutive ID?

Further, could you please translate your error message into english language?

 

I have created a SharePoint list on my side and the data structure as below:7.JPG

Note: The Incremental Value column is a Single line of text type column, which is used to store the generate consecutive ID.

 

If you want to generate a consecutive ID (such as, AAA-001) within your flow and update it to your SharePoint list item, please take a try with the following workaround:

  • Add a "When an item is created" trigger, specify Site Address and List Name.
  • Add a Variables-> "Initialize variable" action, Name set to ID, Type set to Integer and Value set to ID dynamic content of the trigger.
  • Add a Variables-> "Initialize variable 2" action, Name set to Prefix, Type set to String and Value set to AAA.
  • Add a "Increment variable" action, Name set to ID, Value set to 1.
  • Add a Variables-> "Initialize variable 3" action, Name set to Consecutive ID, Type set to String and Value set to empty.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@less(variables('ID'), 9)
  • Within "If/yes" branch of Condition, add a "Compose" action, Inputs set to following formula:
concat(variables('Prefix'),'-','00',variables('ID'))

      Add a "Set variable" action, Name set to Consecutive ID, Value set to output of "Compose" action.

 

  • Within "If/no" branch of Condition, add a Condition 2, click "Edit in advanced mode", type the following formula:
@and(greater(variables('ID'), 9),lessOrEquals(variables('ID'), 99))

 Within "If/yes" branch of Condition 2, add a "Compose 2" action, Inputs set to following formula:

concat(variables('Prefix'),'-','0',variables('ID'))

Add a "Set variable 2" action, Name set to Consecutive ID, Value set to output of "Compose 2" action.

 

Within "If/no" branch of Condition 2, add a "Compose 3" action, Inputs set to following formula:

concat(variables('Prefix'),'-',variables('ID'))

Add a "Set variable 3" action, Name set to Consecutive ID, Value set to output of "Compose 3" action.

 

  • Under Condition action, add a "Update item" action, Incremental Value field set to Consecutive ID variable.

Image reference:

Full Screenshot:

8.JPG

 

Details Screenshot:

9.JPG

 

10.JPG

 

11.JPG

 

12.JPG

The flow works successfully as below:13.JPG

 

14.JPG

 

 

Best regards,

Kris

 

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User
Super User

Please provide more details! How exactly is the erroneous step defined? How is the column you are trying to work on in that step defined?

You say that you want to increase the sequence "AAA-001", "AAA-002", etc. but then you mention something about the style being numeric - which as far as I understand does not allow alphabetic letters!

So more details are needed for us to understand your issue and the best way to help you move forward 🙂

Kind regards, John

Hello!.

 

Look. I have initialize variable of type Int with value SharePoint ID, then initialize a variable of type String, with value AAA, then i incresed the variable ID to 1. And finally i have an action of Sharepoint to update the item. I discovered that the error was in the concatenate function between AAA variable and Sharepoint ID, because i erased the function and it worked again.

 

Thanks a lot for your answer.

 

Cheers! 🙂

Community Support
Community Support

Hi @Isatol,

 

Could you please share a screenshot of your flow's configuration?

Could you please show a bit more about your SharePoint list? Which column is filled with the generate consecutive ID?

Further, could you please translate your error message into english language?

 

I have created a SharePoint list on my side and the data structure as below:7.JPG

Note: The Incremental Value column is a Single line of text type column, which is used to store the generate consecutive ID.

 

If you want to generate a consecutive ID (such as, AAA-001) within your flow and update it to your SharePoint list item, please take a try with the following workaround:

  • Add a "When an item is created" trigger, specify Site Address and List Name.
  • Add a Variables-> "Initialize variable" action, Name set to ID, Type set to Integer and Value set to ID dynamic content of the trigger.
  • Add a Variables-> "Initialize variable 2" action, Name set to Prefix, Type set to String and Value set to AAA.
  • Add a "Increment variable" action, Name set to ID, Value set to 1.
  • Add a Variables-> "Initialize variable 3" action, Name set to Consecutive ID, Type set to String and Value set to empty.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@less(variables('ID'), 9)
  • Within "If/yes" branch of Condition, add a "Compose" action, Inputs set to following formula:
concat(variables('Prefix'),'-','00',variables('ID'))

      Add a "Set variable" action, Name set to Consecutive ID, Value set to output of "Compose" action.

 

  • Within "If/no" branch of Condition, add a Condition 2, click "Edit in advanced mode", type the following formula:
@and(greater(variables('ID'), 9),lessOrEquals(variables('ID'), 99))

 Within "If/yes" branch of Condition 2, add a "Compose 2" action, Inputs set to following formula:

concat(variables('Prefix'),'-','0',variables('ID'))

Add a "Set variable 2" action, Name set to Consecutive ID, Value set to output of "Compose 2" action.

 

Within "If/no" branch of Condition 2, add a "Compose 3" action, Inputs set to following formula:

concat(variables('Prefix'),'-',variables('ID'))

Add a "Set variable 3" action, Name set to Consecutive ID, Value set to output of "Compose 3" action.

 

  • Under Condition action, add a "Update item" action, Incremental Value field set to Consecutive ID variable.

Image reference:

Full Screenshot:

8.JPG

 

Details Screenshot:

9.JPG

 

10.JPG

 

11.JPG

 

12.JPG

The flow works successfully as below:13.JPG

 

14.JPG

 

 

Best regards,

Kris

 

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

I will try your solutions, because it is more complete than mine. Here are my screenshots of my flow:

112244

The result is HAC-20, HAC-21.

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!

Users online (9,989)