I have 2 lists

  • Candidates
  • Positions

In Positions, I create a position, and assign it a candidate and then a status (New, Rejected, Approved, etc). This part is all good.

The challenge I have now is that under the Candidates profile (a selected candidate from a list) I want to show a list or history of all positions that the candidate has been assigned to, and it's current status.

I am currently using SharePoint 2013 and SharePoint Designer 2013. I am assuming a lot of this logic will happen in designer for the 'DispForm.aspx' file.

I guess what I want to do is get all 'Positions' items, find all the objects who is assigned to currently selected candidate object, and display in a list type result along with the status field.

Best way to do it?

  • I assume that in Positions List you create a new item and assign it a candidate value (look up from Candidates List), then you update Status which could be a dropdown list. I also assume that candidates value may reappear if you assign a new position to a candidate. Example, Simon is a candidate and Positions list has 10 rows among which 3 have Simons as candidate value with 3 different positions, example... developer, architect and manager. – Zakir HC Apr 7 '15 at 12:11
  • Yes, 100% on the money. So a candidate can be assigned or associated with many positions. And now in the candidate object, I want to show a list of all those Positions associations. How can I, in designer, reference the Positions list and filter and show only the positions of where the candidate matches that of the selected candidate object? – Simon Apr 7 '15 at 12:23
  • You can create a custom display form in SharePoint designer for the Positions list and set it as the default form. Then using SPServices jQuery Library you can retrieve the list items – Zakir HC Apr 7 '15 at 12:59
  • I guess in Positions the candidate field is a lookup column on Candidates list, isn't it? – MdMazzotti Apr 7 '15 at 13:01

Why make it harder than it is?

From the web UI, Go to the Candidates list. On the ribbon, click on List > Form web part > Default display form.

enter image description here

Add a webpart, choose Positions. Configure the list view as per your requirements. Click on the small arrow on the right-hand side of the webpart title bar, choose Connections > Get filter values from > Candidates. Configure the provider field name and consumer field name appropriately (they should be Title and Candidate).

enter image description here

The end result is that when you click on a candidate, on the display form you will see a list of all the positions this candidate is/was associated with.

  • Ah yes, I was actually just about to ask how I could maybe rather implement a default filter option on that list. Awesome! But when I do those steps, I get the following message.. 'No Provider Schema'. What does that mean? (I tried this on a different list designed in InfoPath, and it worked like a charm. But now when I try and do the same with a list designed in SP Designer, I get that error) – Simon Apr 7 '15 at 13:47
  • It happened to me once, and it basically meant I had screwed up something. I resorted to recreating the list. btw, what do you mean by list designed in SP Designer vs in infoPath? – MdMazzotti Apr 7 '15 at 13:51
  • I edited my Candidates page via InfoPath (a dedicated application to edit forms). On this version of the list, I am able to 'Get Filter Values From' an InfoPath Form Web Part, and I can add a filter with no problem and all works. On a form created via SharePoint Designer, I see the options you show, but I get the schema error. (See pic for the different scenarios.. imgur.com/PBW1x8R ) – Simon Apr 7 '15 at 14:02
  • When you say you resorted to 'recreating the list', what all does that entail? – Simon Apr 7 '15 at 14:08
  • I deleted the list from the web UI and created it again – MdMazzotti Apr 7 '15 at 14:10

If this would have been a custom form or a web part developed in Visual Studio then it would have been easy to get the job done but if you want to do it through SharePoint Designer only then you should create a custom edit form in SharePoint Designer for the Positions list and set it as the default edit form. (I am suggesting edit form to the contrary to the dispform.aspx because edit form will allow to select Candidate value from the dropdown which would be a lookup column, whereas dispform.aspx will not allow you to select a Candidate value)

Then using SPServices jQuery Library "GetListemItems" operation you can retrieve the list items from Positions list.

The trick is you should write a CAML query that retrieves only the Candidate selected in the dropdown and pass it to the query to retrieve only that candidate's history or details.

  • Thank you Zakir, let me see how I get along with this. To be clear, so when I select a Candidate (say, 'Simon') in his 'profile' page there would be a dropdown selector. The value in the dropdown selector would then determine the results of the Positions GetListItems. Im assuming I could hide this dropdown field completely on a Candidate object and force it to always use the selected Candidate as the filter parameter? (Not seeing the need to select the candidate from the list when already viewing the Candidate's profile..) – Simon Apr 7 '15 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.