locked
Can a Number Column be equal to a existing calculated column RRS feed

  • Question

  • I have a calculated column that is working as expected but I can't seem to use any of the Total features, eg Avg, Count, etc.

    I know I can create a number column and use a SPD workflow to copy the value of the Calc column to the number column.

    But is there a way to use the "Calculated Value" (under Default Value) of the "Number column" to get the value of the Calculated Value column? Just thought this might be cleaner than create a WF to do this same thing.

     


    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.
    • Moved by Mike Walsh FIN Wednesday, August 10, 2011 5:15 PM admin q not general - read the where to post guidelines (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Wednesday, August 10, 2011 4:20 PM

Answers

All replies

  • HI,

    I do not understand why you want to copy the value of one column to another and creating copy.

    Anyway ,

    I would suggest you the following:

    1. Instead of number column again use Calculated column.

    2. In the expression just add name of the first column.

    I hope this will help you out.


    Thanks, Rahul Rashu
    Wednesday, August 10, 2011 7:55 PM
  • As I stated in my original post, the reason I am copying the value from the Calculated field to a Number field is so that the Number column can then use the "Total" options like AVG, SUM, etc. They are not available to a Calculated column.
    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.
    Wednesday, August 10, 2011 8:11 PM
  • Hi,

     

    We could use the "calculated value" to set the default value, but you should make sure the value involved in "calculated value" is exist before the item created. So for example, we could use date to be the "calculated value" (year(today)+3), but we could not use the ID column or some calculated column which doesn't exist before the item created.

     

    So I think you need to define a workflow to meet your requirement.

     

    Hope this helps.

     

    Thanks,

    Pengyu Zhao

    Thursday, August 11, 2011 12:41 PM
  • I was hoping to use an IF statement for the default value of he Number column. eg IF column X is NUL then "", otherwise the Number Column is equal to the Calculated column.

    Just not sure that is possible and the syntax.  IF(CalcColumn="","",CalcColumn)

     

    If a WF is the only way to do this, which I'll use SPD to create, what is the best way to get 2000+ existing (completed) list items to run the new WF without having to manually go through each item. We are wanting to get this column populated for historical information.


    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.
    Thursday, August 11, 2011 2:08 PM
  • Hi,

     

    Now what you need is a looping workflow. For this you can refer to

     

    http://sharepointsolutions.blogspot.com/2008/05/looping-through-items-in-sharepoint.html

    http://blog-sharepoint.blogspot.com/2010/01/sharepoint-looping-workflow-how-to-loop.html

     

    You can just delete the workflow and create a new normal workflow after upgrating the column value.

     

     

    Hope this helps.

     

    Thanks,

    Pengyu Zhao

    • Marked as answer by Stunpals Friday, September 2, 2011 3:12 PM
    Friday, August 12, 2011 2:57 AM
  • Pengyu, thanks for the reply this sounds like something I can use but need to go through these links.
    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.
    Monday, August 15, 2011 3:03 PM