0

I'm trying to add [AccountName] "does not contain TEST". Below is the existing code. Can some one show me how to add AccountName does not contain the word 'Test'?

{searchboxquery} contentclass=*  -AccountName:laitramllc.onmicrosoft.com -WorkEmail:Laitramllc.onmicrosoft.com -WorkEmail:[email protected] Department<>NLWC AND Department<>N/A NOT(AccountName:USNO* OR AccountName:USDL* OR AccountName:EUAM* OR AccountName:SABR* OR AccountName:USBA* OR AccountName:AUML* OR AccountName:CNSH* OR AccountName:CNWG* OR AccountName:USHA* OR AccountName:USGR* OR AccountName:CNCD* OR AccountName:USDS* OR AccountName:USHN* OR AccountName:EUWE* OR AccountName:USSP*)
5
  • 1
    Try adding this at the end of query: AND NOT(AccountName:Test). Let me know if it works for you. Commented Feb 16, 2023 at 15:46
  • 1
    This worked! Thank you! Commented Feb 16, 2023 at 16:18
  • Great, glad it worked for you! Commented Feb 16, 2023 at 17:40
  • I have added it as an answer below. Please Upvote(^) & accept as an Answer as it helped you & it will help others with similar question in future. Commented Feb 16, 2023 at 17:40
  • Hi Travis, can you please accept below response as an answer as it worked for you? Commented Apr 30, 2023 at 2:07

1 Answer 1

1

Add this at the end of query: AND NOT(AccountName:Test)

Your query will be like:

{searchboxquery} contentclass=*  -AccountName:laitramllc.onmicrosoft.com -WorkEmail:Laitramllc.onmicrosoft.com -WorkEmail:[email protected] Department<>NLWC AND Department<>N/A NOT(AccountName:USNO* OR AccountName:USDL* OR AccountName:EUAM* OR AccountName:SABR* OR AccountName:USBA* OR AccountName:AUML* OR AccountName:CNSH* OR AccountName:CNWG* OR AccountName:USHA* OR AccountName:USGR* OR AccountName:CNCD* OR AccountName:USDS* OR AccountName:USHN* OR AccountName:EUWE* OR AccountName:USSP*) AND NOT(AccountName:Test)

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.