Dec 10 2019 10:26 AM - edited Dec 12 2019 01:15 AM
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?
Dec 10 2019 11:02 AM
Dec 10 2019 11:43 AM
@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.
Dec 10 2019 06:18 PM
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
Dec 10 2019 11:20 PM
@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).
Dec 10 2019 11:26 PM
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
Dec 10 2019 11:50 PM - edited Dec 11 2019 12:57 AM
@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?
Dec 11 2019 04:36 AM
@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.
Dec 11 2019 03:07 PM
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
Dec 12 2019 12:57 AM
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..
Dec 12 2019 03:07 PM
Nice work @mrhooki! The small stuff can be hard sometimes.
Merry Christmas and Happy new year!
Best wishes
Damien
Dec 12 2019 12:57 AM
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..