INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: calculated fields/template-based database fields?  (Read 1863 times)

rocketsauce

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1059
calculated fields/template-based database fields?
« on: June 19, 2003, 09:31:38 am »

So, I've been seeing the terms calculated fields and template-based database fields pop up in various posts. I read the thread on on calculated fields, but still don't really get it. :-/

http://www.musicex.com/cgi-bin/yabb/YaBB.cgi?board=MediaCenter;action=display;num=1054162707

Can someone explain what these are and why we're supposed to be happy that they've been added to MC?

Thanks.

Rob
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5907
  • Farm Animal Stupid
Re: calculated fields/template-based database fiel
« Reply #1 on: June 19, 2003, 09:37:18 am »

Calculated Fields don't actually store any data. Their content is derived from the values of other fields. Hence they are "calculated".

MC has some calculated fields built in. "Complete Album" and "Album Artist (Auto)" are examples of these. But MC also lets us create our own based on a template that we come up with.

Let's say you want to store, in just one tag, the information for Artist and Album. The reasons for doing this are varied, but one reason could be so you could design a View Scheme around it, so that you can see Artist and Album on the same level. Or you might want to store Year - Album, so that Albums sort by the year they were released, rather than alphabetically.

The Template based Calculated Fields lets you create a new field, and base it on any template you choose. So you could use [Artist] - [Album] field, and MC would fill that in appropriately.
Logged

rocketsauce

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1059
Re: calculated fields/template-based database fiel
« Reply #2 on: June 19, 2003, 01:21:58 pm »

Ok...

I guess it never occurred to me to want to be able to do any of those things in the first place. So, this is kind of a feature I never knew I wanted?

Rob
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5907
  • Farm Animal Stupid
Re: calculated fields/template-based database fiel
« Reply #3 on: June 19, 2003, 01:41:48 pm »

I guess so. :P

Picture it this way... Before you could create a View Scheme of "Artist/Album". That scheme would always sort the albums alphabetically (in the tree/panes). But if you wanted them listed chronologically, you could instead create a view scheme of "Artist/(Year) Album" and then they'd be sorted by "alphabetically" but by year instead of the Album name. In effect, they're sorted chronologically.

That's just one thing you can do with the calculated fields. Who knows what other people will come up with.
Logged

JaWe

  • Regular Member
  • World Citizen
  • ***
  • Posts: 100
Re: calculated fields/template-based database fiel
« Reply #4 on: June 19, 2003, 01:54:40 pm »

I have created new calculated field: "[NAME]" by [ARTIST] from [ALBUM] ([DATE (year)])

I use it in Playing Now and is much better for my eyes than many different fields like name and then artist then album.

Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5907
  • Farm Animal Stupid
Re: calculated fields/template-based database fiel
« Reply #5 on: June 19, 2003, 02:24:33 pm »

What an awesome idea!

I'm going to go do that now. :)
Logged

Kurt Young

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 633
  • Tastes like crab, talks like people.
Re: calculated fields/template-based database fiel
« Reply #6 on: June 26, 2003, 03:21:09 pm »

Here's some questions that relate to calculated fields...

1.  I'm not the sharpest tool in the shed, but I can't for the life of me find any templates!  I'd love to see an example so that I could try what I'm going to mention in #2 below.

2.  I'd like to make a calculated field called "Interest Level"  Basically it'd be:

(Rating + 1) * (number plays + 1)

I had to add the +1's because multiplying by 0 would be lame.

So, this "Interest" field would show me how much interest I've expressed in a particular song, multiplying the rating by the number of plays...
  • Highest rated, most played songs would have a very high score
  • Lower-rated but still often played songs would be in the middle (as would high rated but not played often songs)
  • Low-rated, rarely played songs would have a very low score

I think that'd make for some nice smartlists.  Can MC's calculated fields do it?

If so... how?
Logged
 mjextman.exe /ipodsync

nila

  • Guest
Re: calculated fields/template-based database fiel
« Reply #7 on: June 27, 2003, 12:02:34 am »

Kurt,
Unfortunately, at present they cant. I'd LOVE to see this along with fields to do stuff like give you the total number of items - say for Artist so u could have a field to tell u how many tracks there are belonging to an artist. Or duration for an album to give u the total length of each album etc.


Hopefully if we paint some banners and go on a march they'll be added.

Might work better just to beg Matt though - haven't decided which route to take yet.
Logged

NoCodeUK

  • Citizen of the Universe
  • *****
  • Posts: 1820
Re: calculated fields/template-based database fiel
« Reply #8 on: June 27, 2003, 01:49:16 am »

I would love to be able to add calculated values in the panes to show how many items there were at each underlying level...this would be great.

Adam
Logged
"It's called No Code because it's full of code. It's misinformation." - Eddie Vedder
Pages: [1]   Go Up