locked
Need SharePoint Query help RRS feed

  • Question

  • Hello SP Gurus - I have a Participant List and Registration List. Registration List has lookup column from Participant List. I am looking for a way to get a List of participants whose record doesn't exists in Registration. Is is possible to create a view for this? or CAML Query? 

    Thanks,


    Khushi

    Tuesday, May 23, 2017 6:56 PM

Answers

  • hi

    another approach

    set a new column in the first list , with the name [used], type Yes, No , default NO

    Attach a workflow to the second one , if an item is added, that workflow will set [used] field in first list = YES

    Next create your  view to filter items for values [used]=No

    To fill the list right no, use powershell to check all fields in secondary list, and based on values, update [used] field in first list


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    Tuesday, May 23, 2017 8:16 PM

All replies

  • Hi Kushi,

    Please check the link below

    http://info.summit7systems.com/blog/creating-a-parentchild-list-relationship-in-sharepoint-2013


    Please remember to click Mark as Answer on the answer if it helps you

    Tuesday, May 23, 2017 7:17 PM
  • Thanks Lakshmanan! I am looking for a report/list from participants who haven't registered yet. I have these two list and their forms setup without any issue. The link that you mentioned is more on how to get the Parent Child form setup. Didn't help me.

    Regards,


    Khushi

    Tuesday, May 23, 2017 7:41 PM
  • hi

    another approach

    set a new column in the first list , with the name [used], type Yes, No , default NO

    Attach a workflow to the second one , if an item is added, that workflow will set [used] field in first list = YES

    Next create your  view to filter items for values [used]=No

    To fill the list right no, use powershell to check all fields in secondary list, and based on values, update [used] field in first list


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    Tuesday, May 23, 2017 8:16 PM
  • Thanks Romeo! It is certainly a neat idea. Just want to understand if Participant registered and then unregister (meaning deleted from Registration list), how can we set  No in the Participant List? 

    Best Regards,


    Khushi


    Tuesday, May 23, 2017 8:56 PM
  • hi

    well ...

    in this situation, create a custom permission for second list, which will not permit users to delete items directly

    Set a new field in that second list [fordeletion] - default value NO

    In the first list , change [used]= 0 - a numeric field. 

    (  change the workflow presented in my first answer - increment by one [used] if an item is added to second list )

    Customize the  editForm.aspx  for the secondary list , and insert there a <<fake>> delete button which will set, using javascript , the field [fordeletion] =YEs

    update the workflow mentioned in my first answer, to check if [fordeletion]=yes ;  in this case will decrement [fordeletion] by 1 

    This workflow will delete the item from second list as well


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.


    Tuesday, May 23, 2017 9:16 PM
  • Thanks Romeo! you explained it very well. At this point I think there should be some good way to query both SharePoint list and get the list of participants who didn't register. 

    Best Regards,

    Khushi


    Tuesday, May 23, 2017 9:44 PM
  • Hi,

    I am checking to see how things are going there on this issue. Please let us know if you would like further assistance.

    You can mark the helpful post as answer to help other community members find the helpful information quickly.

    You can also share your own solution here and mark it as answer, and we can learn from each other.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, May 31, 2017 1:49 AM
  • Hi ,

    you can use JSOM for your requirement where first you need to get all participant from participant List.

    After getting all participant from list you can loop through each participant and query to Registration List to check whether the participant registered or not using CAML Query.

    Regards,

    Gaurav

    Mark as answer if they helps...

    Wednesday, May 31, 2017 4:00 AM