Body: <p>I'm looking to set a 'score' property on my "category" field, this will be done by calculating how many entries are within that category similar to a 'Trending' feature.</p>
  
  <p>Is there any way to set a property by doing a sum something like entry.count x 0.4 and then setting the field with the result?</p>
  
  <p>Thanks</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-07T14:55:07.040Z
Comments.Text: Since this value is always dynamic you could just `count` the elements each time you would like to display the number rather than save it into a field. Otherwise you would have to use the `onSave` event to store the information
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-07T17:44:43.177Z
Comments.Text: @RobinSchambach That’s a solid answer, you should post it. I actually think that’s the best solution.
Comments.UserDisplayName: Lindsey D
Tags: <categories><entry>
Title: Setting an Entry field using sum
ThreadText: # Setting an Entry field using sum
  
  (Asked by: username_0 on 2018-04-07)
  
  I'm looking to set a 'score' property on my "category" field, this will be done by calculating how many entries are within that category similar to a 'Trending' feature.
  
  Is there any way to set a property by doing a sum something like entry.count x 0.4 and then setting the field with the result?
  
  Thanks
  
  **Tags:** categories, entry
  
  > **Comments:**
  > **username_1**: Since this value is always dynamic you could just `count` the elements each time you would like to display the number rather than save it into a field. Otherwise you would have to use the `onSave` event to store the information  
  > **username_2**: @username_1 That’s a solid answer, you should post it. I actually think that’s the best solution.  
  
  ---
  
  ## 0 answers
  
  