Environment: SP2013 Enterprise, InfoPath 2013

I'm building a course registration system for a SP client but am having a little difficulty with lookup fields. Basically there are two lists, a course list and a registration list. Users pick a course from the course list and subscribe to it, and a workflow creates an entry in the registration list with the details of the course and the user who initiated the workflow. The idea is that users can view the registration list with a view that displays only the entries with their name on it, thus being able to see all the classes they are signed up for.

The problem is that sometimes the details of the courses change, especially their time/date. I need a way to automatically update all the registrations with the new time/date when this happens. Since workflows cannot iterate through a list searching for matching entries (they stop after the first match), and I want to avoid creating an event receiver due to the cost to the client, I need to make these fields update themselves.

What seems to be the answer is turning them into lookup fields that reference a unique ID for the course and pull its current time/date information. The only way I know of to do this is to create choice fields in InfoPath and have them filter the choices to only show the entry for their respective course. The problem is that by default, while the only value returned by the filter is the correct one, the fields start out blank until someone actually edits them.

So my question is, how can I set the fields to display the returned entry by default? Or is there a better way of accomplishing this than using these lookup fields?

Update: Using the default value option for the fields shows the correct values, but only when the form is opened. It doesn't appear when simply viewing the list in the browser, and cannot be used to set up a calendar view of the registrations (another requirement).

Further Updates: @Oddity suggested using web services in a workflow to get the items from a list and run a loop against them, which seems like it should work, but I need a little help with those web services. I've been reading over documentation on them but if anyone could point me to a tutorial on using it in this context that might be better.

Final Update: The workflow seems to be the way to go and I have it working down to one detail, which is the OData query. Once that is nailed down it will be the final piece of the puzzle. See my new question here for the OData part.

1 Answer 1


SharePoint 2013 workflows allow looping, why not try a workflow that will start if a course changes, and then have it loop through the registration list and update any item that is linked to the course.

In my experience, the closer you get to out of the box, the less headaches.

  • Thanks for your response! I've looked into that but don't see how I can simply loop through an entire list. It has to run on a specific condition, and I don't see a way to abstract it to "the entire list" or "all items matching X", because once it finds the first match it stops. Is there something I'm missing?
    – thanby
    Commented Jan 2, 2014 at 17:38
  • 1
    Here maybe this will help you: proactivespeaks.com/2013/08/08/… I should clarify, this just shows that you can loop through a list, what you do with the list is up to you. So you can set the workflow on list A, and have it loop through list B, etc.
    – Oddity
    Commented Jan 2, 2014 at 20:18
  • Wow I just spent an hour going through that tutorial, but ended up producing a non-functioning workflow (trying to customize it to simply count the items in a list and record the results in another list). While I understand basically what is going on, it's still a bit over my head apparently. I'm using it as a starting point though and looking for more tutorials that can fill in the blanks for me, do you have any other suggestions?
    – thanby
    Commented Jan 2, 2014 at 21:46
  • It seems that basically I just need to build a dictionary and count its items to get an index. The only part I don't know how to do yet is successfully build the dictionary, the rest seems easy. Using web services to get list items is the part that's tripping me up.
    – thanby
    Commented Jan 2, 2014 at 21:48
  • Got it figured out but am still having a little trouble with the OData query, see my final update above for the link to that. In the meantime I'm calling this one closed because the workflow seems to be the answer. Thanks for your help!
    – thanby
    Commented Jan 3, 2014 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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