More > JRiver Media Center 20 for Windows
Examples of the new LOAD and SAVE functions?
mark_h:
Another example. In a view with one album showing, this expression:
if(isequal([track #],load(vartracks[artist][album]),5),save([track #],vartracks[artist][album],),-1)
will count the number of tracks on the album and deposit the result in the variable: vartracks[artist][album]
I'm guessing this could be written to a field for all albums, but would generate a lot of variables...?
Update:
OK, so add a user field 'Album Tracks #' as a calculated field:
if(isequal([track #],load(vartracks[artist][album]),5),save([track #],vartracks[artist][album],1),load(vartracks[artist][album]))
And now you have the count of track numbers for all your albums available...
The (terrifying?!) power of variables... :D
mark_h:
Next challenge - calculate an album average rating...
vagskal:
Clever mark_h!
This gave me the idea to create a field relational to another field (other than the already available artist, album and series stock fields). But this did not work:
Field A (for internal use)
Save([Original Artist],varOriginalArtist[Name],1)
Field B (for display making in effect [Original Artist] relational to [Name]
Load(varOriginalArtist[Name])
I might have misunderstood something...
EDIT because I got wiser: This seems to actually work:
Field A (for internal use)
if(IsEmpty([Original Artist]),,Save([Original Artist],varOriginalArtist[Name],1))
Field B (for display making in effect [Original Artist] relational to [Name]
Load(varOriginalArtist[Name])
rick.ca:
--- Quote from: mark_h on April 26, 2012, 06:52:02 am ---Without variables, AFAIK, it's impossible to do because there is no concept of data perpetuating across records...
--- End quote ---
I meant determine the random week mathematically and Save() the result.
vagskal:
--- Quote from: vagskal on April 26, 2012, 11:58:14 am ---This seems to actually work:
Field A (for internal use)
if(IsEmpty([Original Artist]),,Save([Original Artist],varOriginalArtist[Name],1))
Field B (for display making in effect [Original Artist] relational to [Name]
Load(varOriginalArtist[Name])
--- End quote ---
Well it seems to work only when both [Field A] and [Field B] are set as columns in a view. It does not work if only [Field B] is set as a column. Is that the intended behaviour?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version