Hi All,
Im trying use forms and flow together, when the form response has submitted the ID in excel on Splist should be updated by 1 after every new response submitted. However, i found that we can use the increment variable to acheive this, but while im trying to update the file after the response submitted, the variable is showing me same duplicate value.
i want results to be 1,2,3,4,5 and so on
Please see screen shots: Flow1
Flow2
Sharepoint List
Solved! Go to Solution.
Hi @Tapesh ,
Already offer a solution in the link below and please reply to this link if you have any problem:
I would offer you the workaround to create a new sharepoint list with a Number type column, and create an item in the list with the Number column save the initial value and update the value once a form response is submitted.
Steps:
1. Create a new list "ListNew" with a Number type column Name "Number", create the first item in the list with the Number column set to 1000, the id of this item would be 1 since this is the first item in the new list, the screenshot of the list as below:
2. Create a flow to add a new item for the new response when the response is submitted as my screenshot below:
The flow would get the Number from the listNew, append 1 to the number and use the number to create new item in the list that you need, then update the Number with value(already append 1) in the list.
Hope the solution could help you.
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Tapesh this is becouse your initial value is 112 and every time your flow runs starts in 112 an increments 1.
To do an autoincrement counter what I do is create a sharepoint list, then add an item, so in the next step I get the ID of the list. See the ID is an autoincremental so by default if my flow runs for first time I get 1, then in a second 2 and then 3...
Proud to be a Flownaut!
sounds great, but to be specific, im tryng to update the excel sheet present in sharepoint,
when a form response is submitted,
get response details,
inititialize variable,
increment variable by 1
and then add the row to the table,
this is my current process,
any suggestions?
Shure @Tapesh you need to add this
when a form response is submitted,
get response details,
create item (Sharepoint) here you can add whatever you want remember we need just the ID
and then add the row to the table, (the ID autogenereated)
Proud to be a Flownaut!
I agree with this solution,
but what if i want to start number with 123456 and not with the number which sharepoint list has, as this solution only shows me that i can use Sharepoint Id, in real i want to start my own number series as you know that Sharepoint id can not be reset to the number i want so i want custom number, do you have thought to this ? @ChristianAbata
if you want to manage your own number you eventually needs a sharepoint list to save the value of your sharepoint list for example
you start with 123 and then you add an autoincremental to grow to 124 you need to save that value and at the start of your flow you need to read that last value 124 and then your flow is going to add 1 so is 125... and here you rocks it's your own autoincremental
Proud to be a Flownaut!
I tried as you said but still same, do you have practical solution, can you show me how you want the flow to be excecute
Excellent @Tapesh but you need to get the last value of your list.
Proud to be a Flownaut!
How will do that?
i used get items at first to get the details, how can we retrieve the last item record @ChristianAbata
@Tapesh shuse use this.
body('Get_items')?['value'][0]['ID']
Proud to be a Flownaut!
Hi @Tapesh ,
Already offer a solution in the link below and please reply to this link if you have any problem:
I would offer you the workaround to create a new sharepoint list with a Number type column, and create an item in the list with the Number column save the initial value and update the value once a form response is submitted.
Steps:
1. Create a new list "ListNew" with a Number type column Name "Number", create the first item in the list with the Number column set to 1000, the id of this item would be 1 since this is the first item in the new list, the screenshot of the list as below:
2. Create a flow to add a new item for the new response when the response is submitted as my screenshot below:
The flow would get the Number from the listNew, append 1 to the number and use the number to create new item in the list that you need, then update the Number with value(already append 1) in the list.
Hope the solution could help you.
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.