SharePoint Developer Center > SharePoint Products and Technologies Forums > SharePoint - Workflow > Designer workflow for dynamically updating a calculated column everyday
Ask a questionAsk a question
 

QuestionDesigner workflow for dynamically updating a calculated column everyday

  • Tuesday, June 30, 2009 6:47 PMAdarshkumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have list in which I have added a calculated column which displays colored text with respect to the condition provided. I'm refering Today's column in that formula and comparing today's date with target date to display colored text.But I'm unable to view the updated colored text in the column as the calculated column is not dynamic.
         Can any one help me to solve this problem using SP designer or javascipt as I don't have access to the server and also don't have visual studio to write C# code.

    Is there any possibility to create a workflow using SP designer to dynamically update the calculated column or list item

    This is my formula

    =IF(AND([Concept Stage Exit Actual Date]="",INT(Today)>INT([Concept Stage Exit Target Date])),"<DIV style='color:#FF0000'>"&TEXT([Concept Stage Exit Target Date],"m/dd/yyyy")&"<DIV>",IF(AND(INT([Concept Stage Exit Actual Date])=0,INT([Concept Stage Exit Target Date])=0),"<DIV style='color:#FF0000'>TBD<DIV>",IF(AND(INT([Concept Stage Exit Actual Date])=0,INT(Today)<=INT([Concept Stage Exit Target Date])),"<DIV style='color:#000000'>"&TEXT([Concept Stage Exit Target Date],"m/dd/yyyy")&"<DIV>","<DIV style='color:#348017'>"&"Completed on "&TEXT([Concept Stage Exit Actual Date],"m/dd/yyyy")&"<DIV>")))

     

     Thanks  in advance

All Replies

  • Tuesday, June 30, 2009 6:58 PMMike Walsh MVPMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    ALL Workflow questions go to the Workflow forum.

    Moving this.
    WSS FAQ sites: http://wssv2faq.mindsharp.com and http://wssv3faq.mindsharp.com
    Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx
  • Tuesday, June 30, 2009 7:16 PMAdarshkumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Can you give me any idea how to solve this issue??? thanks in advance
  • Wednesday, July 01, 2009 12:37 PMDavid Mann [MVP]MVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You can have the wf run once, but not everyday.  This should be done with a timer job, which unfortunately requires VS, C#, and server access.
  • Wednesday, July 01, 2009 1:34 PMAdarshkumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Can I add  a button to the page and add some javascript to  update the item whenever it is clicked??
  • Wednesday, July 01, 2009 2:00 PMDavid Mann [MVP]MVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You can update the value client-side with some JS, but not server-side, without deploying some code to the server.
  • Wednesday, July 01, 2009 2:37 PMAdarshkumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ok. Is there any way that we can start the worflow and put that in a loop by not giving any specific value where it stops usually!!.

    Can you give me any idea by looking at this link below??

    http://www.eggheadcafe.com/conversation.aspx?messageid=32054725&threadid=32054718

    Thanks in advance
  • Wednesday, July 01, 2009 5:37 PMDavid Severn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I think you can.
    I just tried a simple test as follows

    created a test custom list
    Added a second column - description single line of text
    Added a third column TitleDescription - calculated column - Title & " " & Description

    Created a new workflow in SP Designer - start when a new item is created and when an item is changed

    1 Condition
    if field title == A
    Actions 'Delay' - i used 5 minutes which actually caused the later actions to run after about 8 minutes !
    then set field title = B
    else
    Actions 'Delay' - i used 5 minutes which actually caused the later actions to run after about 8 minutes !
    then set field title = A


    the change to the field causes an update and a new workflow instance (the same one again) to be started which will delay then update the item etc  

    You wouldnt update the title field but probably a purposely added toggle column just for this purpose - the logic above simply toggles between a and b

    hope this helps
  • Thursday, July 02, 2009 1:06 PMAdarshkumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I'm sorry that I didn't understand the logic perfectly.Can you please explain it a little bit more in brief ?

    Any help is appreciated.