How can I save the Item ID to another field I created in order to use this new field in a calculated column?

  • 24 August 2017
  • 4 replies
  • 5 views

Badge +1

The system that my team uses copied issues from a list on one site to a list on another site. The problem is that there are now overlapping IDs with the old items brought over from the old site and new items being created in the new site. They created a new column and copied the old IDs into the new site since they track items by the ID. So hey are using two different columns: 'ID' and 'Old ID'. There is a third column, 'WS ID', which is a calculated field that uses ID in it, but the calculation does not work. I understand that you can use ID in a calculated field. Is there some way to save the ID number to another field so that I can use this new field in a calculated field?


4 replies

Userlevel 5
Badge +12

Hi Gregory,


There are a lot of different ways to pull this off, but you can always have a workflow that runs on the current item based on whatever condition you need that uses the "Update Item" action to update the column you created with the ID property.

For example, on List A you could have a workflow that runs on Item Create that simply sets the item's own column (let's call it TrackingNumber) to be equal to the value of its own item ID.   So when you move the data from one list to another, you'll have the "old id" stored in its TrackingNumber column.    To give you a more exact solution I'd have to hear more about what you are working with, but this should get you going down the right path.


Thanks,
Mike

Badge +1

Thank you for the quick response. I get an error when attempting this.

The new field (TrackingNumber) is a number field in order to use in a calculated column later. When I try to configure the 'Update Item' action, it says that I need to enter a numeric value to save - it will not let me enter 'ID'. (as seen in the picture attached above)

Userlevel 6
Badge +13

"Value" in the dropdown box means the literal value that you type in that text box, so it's literally trying to put the string "ID" into a number field.

You need to select List Lookup from that dropdown box, then in the Source dropdown select Current Item and then in the Field dropdown select ID.

Userlevel 5
Badge +12

You can also make New ID a text/string type and then it should accept your value.  Depends if you care/need about keeping it as a number type.

Reply