Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lex Godthelp 24 posts 106 karma points
    Sep 21, 2016 @ 15:30
    Lex Godthelp
    0

    Excluding a var selection from another var selection

    Hi guys,

    I'm looking to solve a problem and i could really use your help! I made 2 selections for an overview of events. One where i select all childrens from the events folder and one where i pick the first event which has a checkbox == true:

    var selectionHighlighted = startNode.Children
        .Where("highlight == true")
        .OrderBy("dateEvent")
        .Take(1);
    var selection = startNode.Children
        .OrderBy("dateEvent");
    

    Now i'm looking for a third selection which excludes the selectionUitgelicht from the selection of all events. Something like this:

    var selection = startNode.Children
        .Where("highlight == true")
        .OrderBy("dateEvent").Except(var item in selectionHighlighted);
    

    Any thoughts?

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Sep 22, 2016 @ 07:44
    Dennis Adolfi
    100

    Hi Lex.

    Could you try this:

       var selection = startNode.Children.Where("highlight == true").OrderBy("dateEvent").Except(selectionHighlighted);
    
  • Lex Godthelp 24 posts 106 karma points
    Sep 22, 2016 @ 08:58
    Lex Godthelp
    1

    Thanks Dennis,

    I can't believe i couldn't come up with this myself but that's why you are the man!

    Issue = solved

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Sep 22, 2016 @ 09:01
    Dennis Adolfi
    1

    No, you´re the man! :)

    Haha thank you Lex, your reply made my day! :)

    Take care!!

Please Sign in or register to post replies

Write your reply to:

Draft