SOLVED

Flow create item in another SharePoint list not working (due to destination list column format)

Occasional Contributor

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?

10 Replies
There are various reports of oddities with calculated fields, especially numbers. https://powerusers.microsoft.com/t5/General-Power-Automate/Oddity-calculated-fields-sharepoint/td-p/...
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...

@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.

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

@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).

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

@Damien RosarioCompose shows the correct input- and output values. When comparing output from the two identical flows, one flow returns the correct value in destination list column "UniqueID", whilst the other returns the wrong value in destination list column "Unique_x0020_ID". I don't know the significance of this?

@Damien Rosariomoving outputs (uniqueID) from compose to create item as reference for uniqueID solves problem with wrong value in destination list, but creates a new problem: each item is entered 100 times for some reason.

Hi @mrhooki 

 

For the first bit, your column is called 'UniqueID' and in the other it's called 'Unique ID' with a space between (_x0020_). In itself isn't an issue at all unless you don't reference it right in your flow.

 

For the second bit, not sure why the result is repeating without visually seeing the flow set up.

 

If you can, could you please provide us a screen grab of the affected part of your flow for us to see the source and destination actions? Hard to diagnose without it.

 

I suspect it's a small something that is probably easily overlooked that could be the cause of your grief. I'm happy to explore it with you if you want to continue diagnosing it (and the other forum experts will likely chime in if they see the solution too).

 

Cheers

Damien

 

best response confirmed by mrhooki (Occasional Contributor)
Solution

@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..

Nice work @mrhooki! The small stuff can be hard sometimes.

 

Merry Christmas and Happy new year!

 

Best wishes

Damien