1

I am using SharePoint 2010 and am adding a data view web part to the DispForm page for a custom list. I want to be able to display a history of list items created by the user (NOT currently logged in user). Example:

  1. "User A" adds a new help desk ticket
  2. "User B" views the list item and sees a DVWP that is filtered to display only the results from the list item's creator

Can I do this dynamically using the "created by" field? How would I filter this so that it displays all items created in this list by "created by"? This is for a help desk system I am developing. Essentially I just want to be able to filter based on the list item's creator.

waylonrobert
  • 104
  • 1
  • 7

1 Answers1

0

There will be multiple users who will be adding the ticket. In the dataview properties you have options to display a toolbar over the dataview web part. There are options to Filter,Sort and Group.

Alternatively you can Sort and Group the dataview in SPD based on 'Created By' field. I think this should be the way to do it. The User B should be able to view all tickets grouped by 'Created By' field.

Thanks!

Shankar
  • 448
  • 3
  • 9
  • 34
  • Thanks for the information. I've tried this and it doesn't work as expected. The idea is that the technician should only be seeing results from the person named in the "Created By" field of the help desk ticket they are viewing. What your suggestion does still lists all tickets, just in order by the name of created by. Make sense? – waylonrobert Apr 08 '11 at 21:18
  • @user693837:Now its clear! You have dropdown box that lists users who have created tickets.Selecting on one of the user should display a filtered data content of the cases.add a dropdown control,a button. add javascript to your code in SPD to fetch the selected data from the dropdown and pass it to a query string. on button click call the filter function that takes user as the query string and apply this to the list of tickets. – Shankar Apr 09 '11 at 05:12
  • Actually, there is no way I can put users in a drop-down box. The user is automatically logged using SharePoint's default "Created By". We have too many users to put them into a separate list. – waylonrobert Apr 14 '11 at 22:06
  • You dont need a separate user list, instead populate the dropdown with only the distict values from 'created by' field. – Shankar Apr 15 '11 at 03:50
  • I would not have gone by filtering data based on 'Created By' field. The technician is not worried about who creates the ticket, he is concerned only about the open and active tickets for that day.Check this online demo for more on helpdesk features - http://www.sysaidcss.com/demoChoose.htm – Shankar Apr 15 '11 at 05:19
  • Our technicians need to view the requestor's history to determine which direction the help desk ticket needs to go. That's what way it works here. – waylonrobert Apr 20 '11 at 18:21
  • Hmmm, there is no problem with that. I assume that when you say "User A" in your question there may be multiple users. What if there are multiple users creating tickets at the same time? which one will the technician view first? DVWP should be configured to show the request of all users in this case right? You can determine the history if you group based on the user and probably display the recently created ticket to be the first in DVWP.May be display history for the cases that were created only for that day, limiting the number of entries in you WP. – Shankar Apr 21 '11 at 05:08
  • Thanks for your help Shankar89. I was able to get this filtering to work by creating a workflow that grabs the username in the "Created By" field and puts it into another field called "user", and then on the EditForm.aspx page for the Help Desk Ticket SharePoint list, filter by the "Created By" and "user". – waylonrobert Apr 22 '11 at 15:57