Body: <p>Is it possible to pragmatically delete a matrix block based on its content? I have a channel called "Artist", which has a matrix field with concerts. It'll be about 5-600 concerts in total every year, so it's a bit of a hassle to manually remove old concerts. Every block has a field with the concert date. Is it possible to remove matrix blocks based on that date?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-17T13:40:12.293Z
Comments.Text: I'm curious, why do you feel you need to delete the old content? Can't you just show events with relevant dates?
Comments.UserDisplayName: Steve Rowling
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-17T14:27:39.027Z
Comments.Text: Instead of a matrix of concerts, you might have a channel of concerts, which could have an expiration date like other events.
Comments.UserDisplayName: Marion Newlevant
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-18T12:06:16.263Z
Comments.Text: @SteveRowling It will end up being a mess on the backend with 600 concerts in a year. It'll be near impossible to find anything after only a short while.
Comments.UserDisplayName: peirix
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-18T12:06:57.873Z
Comments.Text: @MarionNewlevant The reason I can't have concerts as channels is because I'm using the free version, which only has one channel section. And it would still be a big mess with 600+ entries.
Comments.UserDisplayName: peirix
Tags: <matrix>
Title: Delete matrix blocks based on their content
ThreadText: # Delete matrix blocks based on their content
  
  (Asked by: username_0 on 2015-07-17)
  
  Is it possible to pragmatically delete a matrix block based on its content? I have a channel called "Artist", which has a matrix field with concerts. It'll be about 5-600 concerts in total every year, so it's a bit of a hassle to manually remove old concerts. Every block has a field with the concert date. Is it possible to remove matrix blocks based on that date?
  
  **Tags:** matrix
  
  > **Comments:**
  > **username_1**: I'm curious, why do you feel you need to delete the old content? Can't you just show events with relevant dates?  
  > **username_2**: Instead of a matrix of concerts, you might have a channel of concerts, which could have an expiration date like other events.  
  > **username_0**: @username_1 It will end up being a mess on the backend with 600 concerts in a year. It'll be near impossible to find anything after only a short while.  
  > **username_0**: @username_2 The reason I can't have concerts as channels is because I'm using the free version, which only has one channel section. And it would still be a big mess with 600+ entries.  
  
  ---
  
  ## 0 answers
  
  