Answers.Body: <pre><code>No need to use search in this case.
  
  {% set results = craft.entries.videoField(':notempty:').orderBy('postDate desc').one() %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-28T07:35:28.470Z
Answers.Text: Thanks, it works!
Answers.UserDisplayName: Matthias
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-26T16:26:56.663Z
Answers.LastActivityDate: 2020-09-26T16:26:56.663Z
Answers.UserDisplayName: Pavel Pavlovich
Body: <p>I would like to set up a query to find the latest news article that has a video attached to it ('video' is a matrix field with a block type that is also called 'video' and a field called 'videoUrl').</p>
  <p>I know I can use the following query, but I get stuck defining searchQuery. Or is there another method?</p>
  <p>{% set results = craft.entries()
  .search(searchQuery)
  .one() %}</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-25T14:08:50.957Z
Comments.Text: There seems to be a similar question/answer over here: https://craftcms.stackexchange.com/a/27297/526 that should put you on the right path!
Comments.UserDisplayName: dmatthams
Tags: <search><query>
Title: Query entries with latest video field containing a URL
ThreadText: # Query entries with latest video field containing a URL
  
  (Asked by: username_0 on 2020-09-25)
  
  I would like to set up a query to find the latest news article that has a video attached to it ('video' is a matrix field with a block type that is also called 'video' and a field called 'videoUrl').
  
  I know I can use the following query, but I get stuck defining searchQuery. Or is there another method?
  
  {% set results = craft.entries()
  .search(searchQuery)
  .one() %}
  
  **Tags:** search, query
  
  > **Comments:**
  > **username_1**: There seems to be a similar question/answer over here: https://craftcms.stackexchange.com/a/27297/526 that should put you on the right path!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-09-26. Score: 2 | Accepted answer
  
  ```
  No need to use search in this case.
  
  {% set results = craft.entries.videoField(':notempty:').orderBy('postDate desc').one() %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks, it works!  
  
  ---
  
  