Time2LoadTestDoc

advertisement
Create a Publish Date functionality for Announcements
Here’s how to create a publish date for each of your announcements, where the announcement will
automatically be “published” when the date arrives.
1. Turn on content approval on your announcements list like this:
In the list’s settings, go to Versioning settings.
Change “Require content approval for submitted items?” to Yes
2.
3.
4.
5.
6.
7.
8.
Create a new Date and Time column in your announcements list called “Publish Date”, and make it a
required column. You can even make it default to today’s date if you’d like.
In SharePoint Designer, create a workflow like this: Open SharePoint Designer, and click <File> and
<Open Site>. Paste in the URL of the site where you’d like to create the workflow, and open it. Click
<File>, then <New…>, then <Workflow…>
Name this workflow “Create Announcement”
Pick your Announcements list from the drop-down list. Only check the box “Automatically start this
workflow when a new item is created”.
Add the first condition to “Compare Announcements field”. If the field Publish Date is less than or
equal to (then, click on value, and choose the little parameter builder button)
Then, choose Current Date, and click OK.
In the Actions section, choose Set Content Approval Status. Set content approval status to
“Approved”, and add comments such as “item automatically approved on publish date”
But, if the announcement is supposed to be published on a future date, we need the workflow to
wait. Click to Add ‘Else If’ Conditional Branch. In the new branch’s Action section, choose Pause
Until Date. Click on this time, and click the function button to display the data binding menu
With the Source as Current Item, choose Publish Date as the field. Click OK.
9.
The second action will be the same as the action on the previous branch.
Set content approval status to “Approved”, and add comments such as “item automatically approved
on publish date”
Here’s what your workflow screen will look like:
We used “is less than or equal to Today” as the condition (instead of is equal to today) because it’s possible
that a user could enter in a past date as the publish date. A condition is not needed in the second branch
because it knows that if the condition in the first branch is not met, then otherwise do this.
 Here’s how to use a single announcements list, categorize the announcements by department, and
allow alerts to be created per category. This list can also be set up to display only the
announcements of the logged in user’s specific department.
In your announcements list, create a new column called “Department”, as a text box, choice
list, or even a lookup to a separate list of departments.
 In the list, create a new, filtered view for each different department, like this:
Click the View drop-down box at the top right of the announcements list, and choose “Create
View”, choose Standard View.
In the Filter section, choose to filter by Department is equal to department name.
Do a new view for each department.
 Now that the filtered views exist, alerts can be set up based on them.

Try it out. On the announcements list, click <Actions> and choose <Alert me>. You’ll notice that
in the “Send Alerts for These Changes” section, there’s a new option that lets you choose to be
alerted on items that exist in a particular view.
In this case, it’s a particular department’s announcements. Also, as an administrator, since you
have the ability to set up alerts for other people, you can create a new alert based on new items
created in the view for each department, and have that alert sent to members of a departmental
group in Active Directory.
Here’s a bonus:
In MOSS Enterprise, set up the announcements web part to display only those of the logged in
user’s specific department:
On the announcements web part, edit the properties of the web part. Edit the current view,
and add the Department column to the view.
 Add the “Current User Filter” web part to the same page. In the web part toolpane, in the
“Select value to provide” section, select the dropdown box called SharePoint profile value for
current user, and select the field, “Department”. Click OK in the web part toolpane.
 Create a web part connection between the Current User Filter and the Announcements web
part’s Department field.

Now, the announcements web part will only display the current user’s departmental
announcements.
Note: If your announcements web part were a Data View Web Part, step 1 above could be
skipped. In other words, when it’s a DVWP that is the consumer web part, the connected field is
not required to be displayed as a column in the web part.
In this example, make a modified version of the announcements web part, that doesn’t display the “Created
By” field.
1. Go to the announcements list and create a new, standard view. (I called mine "Welcome")
2. In the columns section, put check boxes next to Title, Modified, and Body.
3. Sort descending by modified date.
4. Set the filter to:
Expires = _____ (leave it blank)
OR
Expires is greater than [Today]
5. In the style section, set the style to "Newsletter”, or try the “Newsletter no lines” style.
Now, put the Announcements web part on the page, edit the web part, and in the web part’s toolpane on the
right, change the Selected View drop-down box to "Welcome" (this was the name of the view I created in
step one), and click OK.
Here is how to display a “More” link on your announcements web part, so that users will have an obvious
link to click on, to read more of each announcement.
1. Create a new column in your announcements list called “More”, with a field type of “Hyperlink or
Picture”
2. In SharePoint Designer, create a new workflow - Open SharePoint Designer, and click <File> and
<Open Site>
3. Put in the URL of the site where you’d like to create the workflow, and open it.
4. Click <File>, then <New>, then <Workflow>
5. Pick your Announcements list from the drop-down list. Only check the box “Automatically start this
workflow when a new item is created”.
Note: If there is already a workflow running when a new item is created in this list, such as the one
created in the first section of this article, I recommend adding this as a new step in the same “Create
Announcement” workflow, as opposed to having two different workflows running when each item is
6.
created in the list.
This workflow will have no condition.
Action: Build Dynamic String
Click on dynamic string, which will take you to the String Builder dialogue box. Type a backslash,
then click the <Add Lookup> button.
Pick the Path field, and click OK, then type the rest of the string as so:
(The reason for the comma and “Click Here” is so that users aren’t presented with a big long URL to
click, but some nice, short text)
7.
Give the variable a name such as AnnouncementURL
Next Action: Set Field in Current Item Set the More field to … click the function button.
In the Source drop-down box, choose “Workflow Data”, and for the field, choose the variable that you
called “AnnouncementURL” in step 6 above.
8.
Now, in the announcements web part on your site, edit the web part properties, edit the current
view, and add the new “More” field to the view.
9. You can even hide this new field, so it doesn’t display on your announcement forms. In the
announcements list settings, go to Advanced settings. Change the setting “Allow management of
content types” to Yes.
10. Now, there’s a new section in your list’s settings called Content Types that contains one content type
called “Announcement”.
11. Click on the Announcement content type, click on the More field, and change it to Hidden. This will
still allow the column to be added to any view, but the field will be hidden when opening or editing
the announcement itself.
Hopefully, these have been useful little tips for you when working with announcement lists in SharePoint.
Enjoy!
Download