Tuesday, March 27, 2012

display a “More” link on your announcements web part

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”.



  6. 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 created in the list.
  7. 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.
    More Link

    Pick the Path field, and click OK, then type the rest of the string as so:

    More Link

    (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)

    Give the variable a name such as AnnouncementURL
  8. Next Action: Set Field in Current Item -
    Set the More field to … click the function button.
    More Link

    In the Source drop-down box, choose “Workflow Data”, and for the field, choose the variable that you called “AnnouncementURL” in step 6 above.
    More Link
  9. 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.
  10. 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.
  11. Now, there’s a new section in your list’s settings called Content Types that contains one content type called “Announcement”.
  12. 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.

1 comment:

  1. I'm using foundation 2010 and when I try to add the workflow there is no "dynamic string" option?

    ReplyDelete