InitialKey doesnt work in script

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: InitialKey doesnt work in script

Re: InitialKey doesnt work in script

by EinsteinX » Mon May 20, 2013 3:11 am

I don't think I'm smart enough (yet) to use SQL queries

Eins

Re: InitialKey doesnt work in script

by Peke » Mon May 06, 2013 7:52 pm

Currently Only way to manipulate that field is to use SQL queries.

It is on our to do list but not yet fully implemented

See http://www.ventismedia.com/mantis/view.php?id=7181

Re: InitialKey doesnt work in script

by Lowlander » Sun May 05, 2013 10:37 pm

Re: InitialKey doesnt work in script

by mcow » Sun May 05, 2013 4:11 pm

EinsteinX wrote:according the table in the wiki InitialKey should be the correct field.
Which table are you looking at? I don't see InitialKey documented for SDBSongData.

InitialKey doesnt work in script

by EinsteinX » Sat May 04, 2013 4:12 pm

I tried modifying the Swap Artist / Title script to get the song key copied to the Custom 1 field. Running the script I get the error message saying that the object doesn't support property or method: 'itm.InitialKey', though according the table in the wiki InitialKey should be the correct field. The script works flawlessly if I change it to itm.Custom1 = itm.Custom2, so for some reason the script doesn't want to read from InitialKey, though I don't understand why. Can anyone explain? Here's the script:

Sub ExtractKey
Dim list, itm, i
Set list = SDB.CurrentSongList
For i=0 To list.count-1
Set itm = list.Item(i)
itm.Custom1 = itm.InitialKey
Next
list.UpdateAll
End Sub

Tx, Eins

Top