In my previous post, I discussed how to use a SP-Designer workflow to build a simple counter for items in a list. At the end of it, I mentioned that once you have a field created that contains the auto-generated counter, you might want to hide that field from end users on insert (since it will be generated by the workflow), and disable it on update (since you don’t want your business clients mucking with your numbering scheme).
I really like the OfficeToolbox.SharePoint.Lists v1.0 (Custom Forms) tool for exactly that purpose in MOSS 2007 / WSS 3.0. Once you have downloaded and installed it per Sharad’s instructions, follow these steps to hide/disable your new “CustomerNumber” column:
- Navigate to the Settings page for your Customers list
- Click the (newly added) Form Settings link
- Configure the CustomerNumber column to be hidden on the New form, to be shown on the Display form, and to be shown as a read-only label in the Edit Form, as shown below
Click OK to save your changes, and then check out the behavior on your Customer List’s Add, View and Edit pages.
I’ve also downloaded and and attempted to install this tool in SP 2010, including re-naming the “Form Settings” to “Field Settings” as described here. I was not successful. I encountered a correlation error when I tried to deploy the feature. It may work for you, but in the mean time I will see if I can download the code from CodePlex and figure out how to make it to work with SP 2010.
Up next: a bit more complicated real world counting example.