locked
Automumber Custom List Field RRS feed

  • Question

  • I need to create a custom list which includes a field wich will be updated when the user changes the "status" custom field (option with several values) to an auto-incrementing number.

     

    This is, if the user updates the status field to an specific value.. I need to set the value to this custom field... but it must be unique and incremented by one in respect to other items in the list.

     

    This is the classic "autonumber" column... Is it possible to do this in MOSS?

     

    How could I achieve this behaviour? Any tips?

     

    Thank's

    Friday, October 5, 2007 6:00 AM

Answers

  • I can try, but my environment is in Swedish so it's hard for me to accurately describe all the steps in English.

     

    I will assume you have the "Unique Numbers" list setup as described in my post above. Continuing on my "CustomerNo" example, here's what you need to do in Sharepoint Designer (SPD).

     

    1. Open your web site in SPD.
    2. Create a new workflow. In the File menu, select New->Workflow...
    3. In the dialog that appears, give the workflow a name, e.g. "Assign Customer Number". In the drop-down list below, choose to connect the workflow to the list you want to assign autonumbers to (In this case, this would be a list called Customers). Then check the middle option of the three check boxes below, "Start this workflow automatically when a new item is created".
    4. On the same dialog, there is a button at the bottom called "Variables...". Click it. Choose "Add", name it "mNumber" and make it of type "Number". Click OK, and OK again. Now, click "Next" in the dialog.
    5. You can leave the step name as is ("Step 1"). Leave the "Condition" empty, and click the "Actions" button. In the menu that appears, select "Set workflow variable". This will add an action to the list to the right of the Actions button. Now you need to set up this action. Click the link "Workflow variable", this will open a small dropdown list. Select "Variable: mNumber". Then click the next link, "value". This will display a textbox and a small button in place of the link. Click the button ("Show databindings"). This will bring up a new dialog, where you will select the value to assign to the "mNumber" variable. In the "Data Source" drop down, select "Unique Numbers". In the drop down just below ("Field:") select "NextNumber". Now, the dialog will be expanded with a "Find list object" section. In the drop down "Field:", select "Unique Numbers:Title", and in the value box below, type CUSTOMERNO. Click OK. SPD will now give a warning that the look up might return more than one value, just select "Yes" to continue here.
    6. Now you add one more action. Click the "Actions" button and select "Set field in current object". Click the "field" link in the new action, and in the list that appears, select the field in your list that is the target of the autonumber (e.g. "CustomerNo"). Then click the "value" link, and once again click the little button that appears ("Show databindings"). This time, in the "Data Source" drop down, select "Workflow data", and then in the next drop down, select the variable "mNumber". Click OK.
    7. Add yet another action, this time choose the "Update list item" action. Click the link in the new action, "update list object in this list". This brings up another dialog, in the "List" drop down, select "Unique Numbers". Click the "Add" button just below to the right, and in the new dialog's first drop down ("Set this field:"), select "LastNumber" and to the right of the "To this value:" text box, click the formula button. Again, a new dialog appears, in the "Data Source" dropdown, select "Workflow data" and then in the "Field" drop down, select "Variable: mNumber". Click OK twice to get back to the "Update list item" dialog. Now, once again in the "Find list object" section, select "Unique Numbers:Title", and type in the value CUSTOMERNO. SPD will give a warning again, click "Yes".
    8. That's it. Click the "Finish" button, and if all is well, the workflow will be created.

     

    Now, everytime you add a new item to the "Customers" list, this workflow will run and assign an auto-incrementing number to the "CustomerNo" field.

     

    Hope this helps,

     

    /Bill.

    • Proposed as answer by DanielSon1 Friday, August 21, 2009 7:53 PM
    • Marked as answer by Mike Walsh FIN Thursday, March 25, 2010 3:27 PM
    Wednesday, October 17, 2007 11:20 AM
  • I implemented a custom autonumber functionality the following way:

     

    - Created a new list that holds autonumber information, named it "Unique Numbers".

    - Add one integer field, "LastNumber" and one calculated field "NextNumber" to this list. NextNumber formula is "[LastNumber]+1"

    - Add item(s) in this list for any autonumber columns I wish to have. For example, for my "Customers" list I want to have an auto-incrementing CustomerNo column. I want to start numbering my first customer as 1000. So I add an item to this list:

    Title = CUSTOMERNO

    LastNumber = 999

     

    Then, you need to create a workflow in Sharepoint Designer that will trigger on "New item created" (or in your case, I guess it would be on item changed). This workflow should then perform a lookup against "Unique Number", find the item where Title=CUSTOMERNO, get the "NextNumber" value into a variable, store this value into the CustomerNo column, and then update "Unique Numbers" setting LastNumber = your NextNumber variable.

     

    /Bill.

    Friday, October 5, 2007 6:46 AM

All replies

  • I implemented a custom autonumber functionality the following way:

     

    - Created a new list that holds autonumber information, named it "Unique Numbers".

    - Add one integer field, "LastNumber" and one calculated field "NextNumber" to this list. NextNumber formula is "[LastNumber]+1"

    - Add item(s) in this list for any autonumber columns I wish to have. For example, for my "Customers" list I want to have an auto-incrementing CustomerNo column. I want to start numbering my first customer as 1000. So I add an item to this list:

    Title = CUSTOMERNO

    LastNumber = 999

     

    Then, you need to create a workflow in Sharepoint Designer that will trigger on "New item created" (or in your case, I guess it would be on item changed). This workflow should then perform a lookup against "Unique Number", find the item where Title=CUSTOMERNO, get the "NextNumber" value into a variable, store this value into the CustomerNo column, and then update "Unique Numbers" setting LastNumber = your NextNumber variable.

     

    /Bill.

    Friday, October 5, 2007 6:46 AM
  • Bill,

     

    Thanks, I tested it out and it worked like a charm... I will be showing this to my customer on monday.

     

    Fedro

    Saturday, October 6, 2007 12:57 AM
  • Dear Bill and Fedro,

     

    I'm trying to figure out the solution you provide here for autonumbering. I'm a newbey on designing WF, please could you provide me with some more details?

     

    With regards,

    Eric Dubbelaar

    Wednesday, October 17, 2007 10:00 AM
  • I can try, but my environment is in Swedish so it's hard for me to accurately describe all the steps in English.

     

    I will assume you have the "Unique Numbers" list setup as described in my post above. Continuing on my "CustomerNo" example, here's what you need to do in Sharepoint Designer (SPD).

     

    1. Open your web site in SPD.
    2. Create a new workflow. In the File menu, select New->Workflow...
    3. In the dialog that appears, give the workflow a name, e.g. "Assign Customer Number". In the drop-down list below, choose to connect the workflow to the list you want to assign autonumbers to (In this case, this would be a list called Customers). Then check the middle option of the three check boxes below, "Start this workflow automatically when a new item is created".
    4. On the same dialog, there is a button at the bottom called "Variables...". Click it. Choose "Add", name it "mNumber" and make it of type "Number". Click OK, and OK again. Now, click "Next" in the dialog.
    5. You can leave the step name as is ("Step 1"). Leave the "Condition" empty, and click the "Actions" button. In the menu that appears, select "Set workflow variable". This will add an action to the list to the right of the Actions button. Now you need to set up this action. Click the link "Workflow variable", this will open a small dropdown list. Select "Variable: mNumber". Then click the next link, "value". This will display a textbox and a small button in place of the link. Click the button ("Show databindings"). This will bring up a new dialog, where you will select the value to assign to the "mNumber" variable. In the "Data Source" drop down, select "Unique Numbers". In the drop down just below ("Field:") select "NextNumber". Now, the dialog will be expanded with a "Find list object" section. In the drop down "Field:", select "Unique Numbers:Title", and in the value box below, type CUSTOMERNO. Click OK. SPD will now give a warning that the look up might return more than one value, just select "Yes" to continue here.
    6. Now you add one more action. Click the "Actions" button and select "Set field in current object". Click the "field" link in the new action, and in the list that appears, select the field in your list that is the target of the autonumber (e.g. "CustomerNo"). Then click the "value" link, and once again click the little button that appears ("Show databindings"). This time, in the "Data Source" drop down, select "Workflow data", and then in the next drop down, select the variable "mNumber". Click OK.
    7. Add yet another action, this time choose the "Update list item" action. Click the link in the new action, "update list object in this list". This brings up another dialog, in the "List" drop down, select "Unique Numbers". Click the "Add" button just below to the right, and in the new dialog's first drop down ("Set this field:"), select "LastNumber" and to the right of the "To this value:" text box, click the formula button. Again, a new dialog appears, in the "Data Source" dropdown, select "Workflow data" and then in the "Field" drop down, select "Variable: mNumber". Click OK twice to get back to the "Update list item" dialog. Now, once again in the "Find list object" section, select "Unique Numbers:Title", and type in the value CUSTOMERNO. SPD will give a warning again, click "Yes".
    8. That's it. Click the "Finish" button, and if all is well, the workflow will be created.

     

    Now, everytime you add a new item to the "Customers" list, this workflow will run and assign an auto-incrementing number to the "CustomerNo" field.

     

    Hope this helps,

     

    /Bill.

    • Proposed as answer by DanielSon1 Friday, August 21, 2009 7:53 PM
    • Marked as answer by Mike Walsh FIN Thursday, March 25, 2010 3:27 PM
    Wednesday, October 17, 2007 11:20 AM
  • Dear Bill,

     

    Many thanks for your clear explantation. It works!

    Many thanks again...!

     

     

    With warm regards,
    Eric Dubbelaar

    Wednesday, October 17, 2007 7:10 PM
  • Dear all,

    im really new with sharepoint & try to create the auto increment number by following the steps. but somehow, when i open the SPD, but i could not find workflow in File --> New. Am i missing something?

    Tks.
    Monday, March 3, 2008 9:52 AM
  •  

    Hello all,

     

    First of all thanks for the clear explanation on how to create the autonumbering field.

    I have it working, but there is only one thing that won't work.

    Maybe there is here someone who can help me with this.

    I cann't search on the number that's created by the autonumbering workflow.

    Does someone have a solution for this?

     

    Regards

    Tuesday, March 4, 2008 8:17 AM
  • Hello Syamei,

     

    The option new -> workflow is available within sharepoint designer when you have installed SharePoint Services 3.0 of the newest portal version.

     

    Regards

    Tuesday, March 4, 2008 8:23 AM
  •  

    > First of all thanks for the clear explanation on how to create the autonumbering field.

     

     

     

    I can search on the numbers. I have a second step in my autonumber workflow, that will create a string consisting of the autonumber + a persons name and location (eg. "1002 - John Doe, New York"). This string is then stored in the Title field of the object. I guess this might be the reason search is working for me.

     

    /Bill.

    Tuesday, March 4, 2008 8:54 AM
  • I am sure I have done this right... Is anyone having their workflow doing nothing?

    Wednesday, March 26, 2008 10:45 PM
  • Bill,

    I followed all your steps outlined above but I'm having a problem assigning the "nextnumber" value in step 5; it doesn't show up on the list .  I'm not sure if it has something to do with the fact that NextNumber is a calculated value.  Is there something that I need to do to force it to show up?

     

    Thx.

     

    HJ

    Thursday, April 3, 2008 2:37 PM
  •  jamiekovalsky@hotmail.com wrote:

    I am sure I have done this right... Is anyone having their workflow doing nothing?

     

    My problem was because System Account can not start workflows with SP1...

    Thursday, April 3, 2008 3:49 PM
  • Hi Bill, This is very good!!!!!!  I'm pretty new on sharepoints and got SPD and this worked very good.  

    Now, how can I set this new "CustomerNo" to read-only?

    Wednesday, April 30, 2008 10:46 PM
  •  LHA wrote:

    Hi Bill, This is very good!!!!!!  I'm pretty new on sharepoints and got SPD and this worked very good.  

    Now, how can I set this new "CustomerNo" to read-only?

     

     

    You can use some javascript...

    here is a start...
    http://wss.collutions.com/Lists/FAQ/DispForm.aspx?ID=118

    Thursday, May 1, 2008 4:54 AM
  • Hi Jamie,

     

    Because of company policies I should not use coding in the sharepoint, I'm only allowed to do some design changes, but should not change the site with programming.

     

    Thanks anyway  (Although I was not able to see the link you sent)  I appreciate you took a moment to send it

     

    Thursday, May 1, 2008 1:01 PM
  • No Problem LHA.

    I have been working with MOSS 2007 for only a couple months now... and I have come to the realization that sharepoint "out-of-the-box" will not handle very many of the basic needs of a client, be it simple or complex. Customization through Javascript or .NET development is almost a necessity and even they may not solve your solution, without letting go of many of the great built in features that had clients wanting to purchase the product in the first place.

     

     

    Thursday, May 1, 2008 6:40 PM
  • I Think I tend to agree with kova81, admittedly MOSS is quite a powerful product out-of-the box. You can achieve quite a great deal of stuff with the product itself and a few customizations using SPD.

     

    But, whenever the user tries to "customize" their SP experience beyond what was envisioned by MS, things get progresively complicated. During my 6 months with MOSS experience by now I have found several bugs, shortcomings and limitations in the product. MS will not say when or how will they solve them (and yes I have openes several support cases with MS). Programming and deploying custom code is not an easy task (although some improvement has been done en the past few months).

     

    Overall, I would say that, if you restrain your project to what MOSS already offers, it is a powerful and easy to develop application framework. but, If you deviate from that (and users usually do), then sometimes the whole RAD aspect of MOSS simply vanishes away.

     

     

    Wednesday, May 21, 2008 2:23 PM
  •  

    Shouldn't step 3 reall use a list called "Unique Numbers" instead of a list called "Customers"?

     

     

    Wednesday, June 18, 2008 5:24 AM
  • I do not think so, step three refers to selecting the custom list where the "autonumber" field will be assigned, that is, the custom list which needs to be "auto numbered" so, selecting "customers" here and assigning the workflow to it will let the workflow assign a calculated number to the "customer id" field whenever an item is inserted.

    Thursday, June 19, 2008 7:00 PM
  •  

    Actually this does not work.  I followed the same and it works fine, but there is an slight possibility that 2 users do this process at the same time, in which case it might give you the same number.

     

     

     

    Thursday, June 19, 2008 10:54 PM
  •  LHA wrote:

     

    Actually this does not work.  I followed the same and it works fine, but there is an slight possibility that 2 users do this process at the same time, in which case it might give you the same number. 

     

     

    You are probably right. In my system, there is only one concurrent user, so it's not a problem for me. But I did think about it, and searched but I could not find any information if the workflow would run in a transaction. I'm guessing it does not. So this solution is fine for a "small" system, but if I was to build this functionality again today, I would use an Event Handler instead and perform the number lookup and update in a transaction.

     

    • Edited by Mike Walsh FIN Thursday, March 25, 2010 3:31 PM Do not use full quote.
    Saturday, June 28, 2008 9:40 AM
  • I hust had the same problem. Set the NextNumber field to Calcutated and "The data type returned from this formula is: Number (1, 1.0, 100) "  Then it appears.

    Thursday, July 10, 2008 6:39 AM
  • Hi Bill
    Thanks for your excellent explanation on how to create the autonumbering field.
    Can you please create a similar descripten for your second step with the autonumber + a persons name and location, so that I can search on the numbers.
    Thank's in advance

    Devin
    Tuesday, September 2, 2008 11:16 AM
  • English:

    Hello everybody,

    I tried "a__Bill__F__"'s instruction  and it works fine! So I translated his expaination into German in my own words. Hope it helps some users, which don't understand English.

    _____________________________________

    Deutsch:

    Hallo zusammen,

    ich habe die Anleitung von "a__Bill_F__" getestet und muss sagen sie funktioniert echt gut. Da es sicherlich hier Leute gibt, die kein Englisch können, habe ich es mal in eigenen Worten auf deutsch zusammengefasst.

    _____________________________________

    Auto-Inkrement in WSS 3.0

     

    1.         In WSS eine neue Liste erstellen (hier im Bsp. „Liste1“)

    2.         Einstellungen/Einstellungen für 'Liste'/Spalte erstellen

    a.    1x Name: „LastNumber“ als Typ: „Zahl (1/10/100)“

    b.    1x Name: „NextNumber“ als „Berechnet“ mit der Formel: „[LastNumber]+1“

    c.     1x Name: „CustomerNo“ als „Eine Textzeile“

    3.         Dann in der Liste1 ein neues Element hinzufügen
    Titel: CUSTOMERNO
    LastNumber: z.B. 999 (somit beginnt die erste Rechnung mit der Nummer 1000)

    4.         SharePointDesigner 2007 starten -> Datei/Webseite öffnen/‘Webseite eingeben‘

    5.         In den Ordner wechseln, der relevant ist (d.h. wo „Liste1“ liegt)

    6.         Neu/Workflow

    7.1     Name des Workflows: „Inkrement“ (Beispiel)

    7.2     Ordner wählen, in welcher Liste das Workflow angeführt werden soll. Hier-> „Liste1

    7.3     Nur mittleres Kästchen wählen „Diesen Workflow automatisch starten, wenn ein neues Element erstellt wird“

    7.4     (unten) Variablen…/Hinzufügen
    Name: mNumber
    Typ: Nummer -> 2xOK, weiter >

    8.1     Aktionen/Workflowvariable festlegen

    8.2     Workflowvariable: mNumber
    Wert->
    fx-> Quelle: Liste1 | Feld: NextNumber
    (unten) Feld: Liste1:Titel |Wert: CUSTOMERNO | OK, Ja

    8.3     (erneut) Aktionen/Feld im aktuellen Element festlegen
    Feld: CustomerNo | Wert->fx
    ->Quelle: Workflowdaten | Feld: Variabel:mNumber | OK

    8.4     (nochmal) Aktionen/Listenelement aktualisieren
    diese Liste“/Liste1->Hinzufügen
    Festzulegendes Feld: LastNumber
    Diesen Wert zuweisen ->
    fx->Quelle: Workflowdaten | Feld: Variable:mNumber | 2xOK
    (unten) Feld: Liste1:Titel | Wert: CUSTOMERNO | OK, Ja

    9.         Fertig stellen


    • Edited by Breuninger Friday, October 10, 2008 12:43 PM
    Friday, October 10, 2008 12:42 PM
  •   Thanks a lot Bill...its works.... ur a life savior...
    Thursday, January 15, 2009 9:42 PM
  • Hello -

    I'm trying to implement an autonumber field for contracts.  Would you be able to detail out the instructions for using the event handler you mention above?

    Thanks!
    Monday, July 13, 2009 10:53 PM
  • I know this was discussed some time ago, but I was hoping the Bill or someone could explain to me how to add the second step that is referenced above.  I need to do that and am very unfamiliar with workflows.

    Thanks
    kelz1004
    Tuesday, August 11, 2009 11:15 PM
  • I can try, but my environment is in Swedish so it's hard for me to accurately describe all the steps in English.


    Hi Bill,

    Great and helpfull, Can we make it more dynamic , without specifying any column in workflow as we did

    Title=Customer No

    it means list will be updated only when a user will provide title 'Customer No', my question is can we update it what ever will be title added by user.

    Thanks
    Shahab
    Thanks.
    • Edited by Mike Walsh FIN Thursday, March 25, 2010 3:32 PM Do not use full quote. Massive waste of screen space here
    Sunday, August 23, 2009 7:39 AM
  • Hi Bill,

    Excellent description and talk through. I only have one problem...

    The autonumber list is set up, and the workflow has been created. The workflow is assigned to the correct list. However when I create a new item the number dosen't appear. At the moment the field is set up as required, and to only accept numbers. Do i have to change anything?

    Best regards

    Bruce
    Monday, September 7, 2009 3:01 PM


  • This is a great thread, but in running through the example, on small thing and one larger thing jumped out that are not making full sense to me.

    The small thing -- one (6) of Bill's list, it asks for Set field in current object and I don;t see such a choice in my Designer 2007 working on enterprise MOSS 2007, although I do see Set field in current item , which seems to do the same thing.  Is this in fact the same?

    The slightly bigger thing --  I am targeting using this as a techniques to auto-number contracts created in Word 2007 using a Word Template as the content type in a document library.  The ContractNumberAssign work flow starts as advertised on an item create in the document library, but it errors out before it completes with the following log entry:

    The following events have occurred in this workflow.
    Date Occurred
    Event Type
    Presence enabled for this column User ID
    Description
    Outcome
    9/8/2009 10:49 AM Error
    No presence information System Account
    Error updating a list item Document checked out


    However, when I then run the work flow manually, it assigns the value, no problem.

    So my questions is, is there something specific in this procedure that would work for updating lists but would fail for updating documents libs, and if so, are there any clever ways around the issue (other than the manual assignment, which may work, but seems a little crude is all)?  Or perhaps I am totally out to lunch, wouldn't be the first time.

    Cheers,

    - Michael




    Tuesday, September 8, 2009 5:54 PM
  • I encountered same problem.  I think it is because the document is still checked out when the workflow tries the update.
    Tuesday, September 8, 2009 7:51 PM
  • Autonumber is a default field on all lists.  You can't see it through list settings.  To see it, you need to either create or modify a view and choose to display the ID field.
    Friday, September 18, 2009 7:26 PM
  • Hi Bill, many thanks for the solution here, this works a treat, especially as I have never used SPD before, installed the package, followed your instructions and bingo....

    One question I would like to ask though, can the number be padded, i.e. instead of 1, 2, 3 etc. is there a way off putting 0's in front, i.e. 001, 002, 003 etc.

    Thanks once again though, very good solution

    Kevin
    Thursday, September 24, 2009 5:33 AM
  • That a major help.  Do you think it would be safe to use this quasi-reserved field as part of a calculation to assigned customers numbers, which one assigned should be stable?  Like add 1000 to make the 1, 2,4, etc, look more like 1001, 1002, 2003, etc.

    Thanks,

    - Michael
    Wednesday, September 30, 2009 3:05 PM
  • Worked perfectly, great walktrough, many thanks, fantastic!
    Thursday, December 3, 2009 4:50 PM
  • Hi all, is there any way to do this without Sharepoint Designer? I dont have designer enabled on the Sharepoint I am using.
    Friday, February 5, 2010 9:44 PM
  • hi.....

    i am seeting the variable as mName but i did n't get the unique id anywhere pls can any one help me....

    Wednesday, March 24, 2010 7:22 AM
  • No, you'll need SPD for the method described here. Can't you just install it, or don't you have enought permissions?

    Wednesday, March 24, 2010 7:27 AM
  • The metohd described here won't work if you haverequired checkin/out enabled. Could that be the problem?
    Wednesday, March 24, 2010 7:29 AM
  • So how can i come out of it and get an get unique id.
    Wednesday, March 24, 2010 8:20 AM
  • I have this solution, as old as it may be, working great. I only have one problem:

    I'm using this on a purchase log and some items will not have a "PO Number" as I call it. If the user creates a new item but blanks out the autocounted number that came from the variable, the system will continue on as if they used the number. This causes a skip in numbers.

    I'm trying to figure out a condition before the actions that will check the last item and see if the number is blank. If so, use the last number it should have.

    Does this make sense?

    Wednesday, May 26, 2010 5:36 PM
  • Hello Bill.

    Excelent Idea. It works very fine for me, but now I has two problems:

    1) I don't know how, but my workflow runs more than one time, and my auto number is increasing without a regular sequence. i.e 1, 5, 15, 40, etc

    2) Because of the problem number 1, I decided use a start manual, but when I deleted the workflow to build a new one, with the correct fields, when I will start a workflow from the list, I got the follow error: "Value does not fall within the expected range."

    Could you help me with this errors ?

    Thanks a lot.

    Wednesday, June 23, 2010 10:28 PM
  • First of all thanks, i was looking this type of solution - "Auto generated field in Sharepoint List",

    i have implemented on my list, workig fine.

     

     Thanks,

    Tuesday, July 20, 2010 2:25 PM
  • I accomplished the read-only goal using a simple, non-code approach.

    The trick is to utilize the read-only nature of calculated fields.

    Referencing Bill_F's instructions, instead of using the workflow to update the CustomerNo field directly, have the workflow update another field called (for example) HiddenCustomerNo.

    Make the field HiddenCustomerNo a hidden field.

    Make the field CustomerNo a calculated field. The formula should be (no quotes): "=[HiddenCustomerNo]"

    This way, the user will only see the calculated field, which will be read-only.

    The only downside is that calculated fields do not display when editing a record; the user has to be in view mode to see the value of CustomerNo. But that suffices for most user requirements.

    • Proposed as answer by lfranzma Thursday, February 3, 2011 8:19 PM
    Wednesday, July 28, 2010 10:06 PM
  • Thanks Bill, this is great!
    http://technicallead.wordpress.com/
    Friday, October 1, 2010 12:32 PM
  • TG99, Great idea.

    I resolved my issue using a variety of solutions:

    Bill's workflow to generate a unique number worked great and I had never created a work flow in Designer. Thanks Bill!

    I set my autonumbering routine to match that of SharePoint's ID.  I did not start at 100 or 1000, but started where the ID left off (as the list was already in existance). 

    I'm a little worried there may be a bug in my theory that my unique "Record#" will stay in sync with the ID.

    Assuming my theory is sound, here's how I added my the read-only calculated "Record#Calc" on the EditForm.aspx. (All the other views and forms work properly when displaying the original "Record#" that was updated via the workflow.)

    1. I created a calculated field, "Record#Calc", the formula is =[Record#]
    2. I used 2 Content editor web parts of the Editform.aspx. One to expose the ID at the top, One to hide the editable "Record#".
    3. See this blog for adding the ID as the top row of the table: http://blog.pentalogic.net/2010/07/showing-the-records-id-on-the-view-and-edit-forms/ .  Put this CEWP above the list web part.
    4. I relabled the item as "Record#" for consistency (first <td> in the row)
    5. I used info from this post to hide the editable "Record#": http://sharepointstruggle.blogspot.com/2010/07/hiding-special-all-day-event-recurrence.html.  This post was relevant to me as my list is a customized calendar.  Put this CEWP after the list web part and omit the reference to the js library as you already have this in the first CWEP.  Make sure that your editable "Record#" is in the first position on the edit form.  Please note that SharePoint starts counting rows at 0 and the ID row does not count.  Hiding row 1 will actually hide the 2nd row in your editform.aspx so hide row 0 instead.

    I would appreciate any advice re: whether my assertion that my unique "Record#" updated via the workflow will continue to stay in sync with the out-of-the-box ID.  It seems to work in my testing.

    Thanks to all for their assistance in performing what should be a relatively simple task.

    Fran

    Thursday, February 3, 2011 8:33 PM
  • Sorry.  I just discovered my assertion is wrong.  The calculated "Record#" does not stay in sync with the ID with the logic posted above.  I'll leave my post as it may have some value for other solutions.

    Any advice on how to make this unique read only... or prepend my custom "Record#Calc" to the EditForm.aspx would be appreciated.

    Thursday, February 3, 2011 8:41 PM
  • Hi a_Bill_F_

    Thanks in advance. I am usign SPD 2010. can we do this in SPD 2010???


    Thank you, Shilambuselvan | IT Support ABAN | Chennai - 600 008 | India
    Wednesday, February 9, 2011 10:06 AM
  • I wish that people (you are not the first by a long way) would not ask SP 2010 (or SPD 2010) questions in a thread in the pre-SP 2010 forums.

    I'm now going to lock this thread, so if you want an answer you will have to ask in the correct place.

    Moderator pre-2010 forums


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters
    Wednesday, February 9, 2011 2:50 PM