Copied to clipboard

Flag this post as spam?

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


  • Richard Thompson 14 posts 94 karma points
    Aug 02, 2023 @ 10:38
    Richard Thompson
    0

    Examine search

    Hi,

    Does any 'Examine' wizards out there know how to include nodes if a field does not exist in the node?

    We using Umbraco 10.6.1

    Thanks Rich

  • Huw Reddick 1932 posts 6722 karma points MVP 2x c-trib
    Aug 02, 2023 @ 15:20
    Huw Reddick
    0

    I don't think it is possible

  • Richard Thompson 14 posts 94 karma points
    Aug 02, 2023 @ 16:16
    Richard Thompson
    0

    Hi Huw,

    I figured it out in the end, although I think the way I worded the question could have been a little better : )

    queryWithOps = queryWithOps.Not().Field("dontShowInAugust", "1");
    

    So if the 'dontShowInAugust' yes/no toggle field is Not set to Yes then include the node in the search results.

    This way if the 'dontShowInAugust' field is not part a node it will automatically be included in the search results anyway.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies