Forum Discussion
Flow create item in another SharePoint list not working (due to destination list column format)
I have a flow creating an item in a "destination" SPO list when an item is created in a "source" SPO list.
In source list, when an item is created, the item is updated (with flow), putting ID into a "increment number" field, and then an "uniqueID" is calculated based on [Increment number & 1000000]. Even tough I have a delay in my create flow, the "unique ID" exported to destination list is 1000000, i.e. without increment number. Could field types or JSONs mess this up or is it something else?
Damien_Rosariothanks for all you help. I removed the get items and compose to avoid (unresolved) duplication after changing number of decimals in destination list UniqueID and Increment number columns from auto to 0 (consistent with other lists). The devil can certainly be in the details..
- Alan MarshallSteel ContributorThere are various reports of oddities with calculated fields, especially numbers. https://powerusers.microsoft.com/t5/General-Power-Automate/Oddity-calculated-fields-sharepoint/td-p/360009
I would use a text column and set the value in Flow rather than use a calculated column in SharePoint especially if the value doesn't change. You try a number column but based on this article you may have to correct the decimals: https://powerusers.microsoft.com/t5/Building-Flows/Calculated-SharePoint-field-in-Flow-email-showing-extra-0-s/td-p/153069- mrhookiCopper Contributor
Alan Marshall will give it a try. Funny thing is that I have an identical flow between two other SPO lists with calculated column, and this is totally fine.
- Damien_RosarioSilver Contributor
Hi mrhooki
Assuming I understand you right, you have a unique ID that's generated from the increment number field in your Source list that is increment + 1000000 which should automatically calculate itself in the list item. You then want to take the unique ID and put that into the Destination list (I'm assuming your destination list has the unique ID field set as Text).
If this is a case, maybe try this, after the Create item (ref Source list) action in your Source list, use the Get item (ref Source list) action to retrieve the newly calculated unique ID and then reference it in the Destination list > Create item (ref Destination) action using the unique ID from Get item (Source list).
I would think that Create item for the Source list hasn't calculated the new unique ID when initially created, and that you need to use Get item to retrieve the new calculated value before exporting it to the Destination list.
The Get item step may be the thing you are missing in your flow.
Cheers
Damien
- mrhookiCopper Contributor
Damien_Rosarioyour assumptions are all correct, except destination uniqueID column is number, not txt. Get items returns the same value in destination list, i.e. without increment number. An identical flow, also with calculation in source list and number in destination list returns correct value (without get items).
- Damien_RosarioSilver Contributor
Hi mrhooki
Is the source list producing the correct result as intended? If yes, maybe try a Compose box after Create Item (Source list) and put the unique ID into that to see what value it is retrieving in the run log?
Super annoying that you have the same set up elsewhere but it's giving you a different result here.
Hope you figure it out soon friend!
Cheers
Damien