MSDN > 論壇首頁 > SharePoint - Workflow > Designer workflow for dynamically updating a calculated column everyday
發問發問
 

問題Designer workflow for dynamically updating a calculated column everyday

  • 2009年6月30日 下午 06:47Adarshkumar 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    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

所有回覆

  • 2009年6月30日 下午 06:58Mike Walsh MVPMVP, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    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
  • 2009年6月30日 下午 07:16Adarshkumar 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Can you give me any idea how to solve this issue??? thanks in advance
  • 2009年7月1日 下午 12:37David Mann [MVP]MVP, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    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.
  • 2009年7月1日 下午 01:34Adarshkumar 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Can I add  a button to the page and add some javascript to  update the item whenever it is clicked??
  • 2009年7月1日 下午 02:00David Mann [MVP]MVP, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    You can update the value client-side with some JS, but not server-side, without deploying some code to the server.
  • 2009年7月1日 下午 02:37Adarshkumar 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    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
  • 2009年7月1日 下午 05:37David Severn 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    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
  • 2009年7月2日 下午 01:06Adarshkumar 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    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.