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 1929 posts 6697 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.

Please Sign in or register to post replies

Write your reply to:

Draft