INTERACT FORUM

More => Old Versions => Media Center 11 (Development Ended) => Topic started by: rocketsauce on June 19, 2003, 09:31:38 am

Title: calculated fields/template-based database fields?
Post by: rocketsauce 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
Title: Re: calculated fields/template-based database fiel
Post by: Doof 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.
Title: Re: calculated fields/template-based database fiel
Post by: rocketsauce 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
Title: Re: calculated fields/template-based database fiel
Post by: Doof 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.
Title: Re: calculated fields/template-based database fiel
Post by: JaWe 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.

Title: Re: calculated fields/template-based database fiel
Post by: Doof on June 19, 2003, 02:24:33 pm
What an awesome idea!

I'm going to go do that now. :)
Title: Re: calculated fields/template-based database fiel
Post by: Kurt Young 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...

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

If so... how?
Title: Re: calculated fields/template-based database fiel
Post by: nila 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.
Title: Re: calculated fields/template-based database fiel
Post by: NoCodeUK 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