Page 1 of 1

Update catalog using links in custom field

Posted: 2015-01-10 12:20:40
by Teebee
How can i update the entire database using the imdb url, when the url is stored in a custom field, and not the original URL field?

I store my links for imdb in a custom field named imdblink

Posted: 2015-01-10 12:51:02
by Raoul_Volfoni
Hi Teebee,

You can use the "Update Fields" script to do that.
Menu -> Tools > Scripting (Shift+F6)
Use the "Update Fields" script on your entire database and select "copy field 1 in field 2".
If you want to clean origin field, you'll have to set the option "vider champ d'origine" in consequence.

Important :
Before any database manipulation, do a copy of it ;)

Posted: 2015-01-10 13:15:06
by Teebee
But that will overwrite my stored links in URl, and i want to keep those.

I can store them in a new customfield first using the copy to method, but i was wondering if there isnt a quicker solution.

Posted: 2015-01-10 19:15:01
by Raoul_Volfoni
Ok, I didn't understand what you wanted to do.

There is an old script by "scorpion7552", to swap fields, but it doesn't support custom fields.

The quicker way is to change manually the script to get the address from your custom field in batch mode.
In the last imdb script (3.85) you have to change just a single line of the script.
If you use the amc script editor it's the line 1018. Or search for these lines at the end of script

Code: Select all

    if GetOption('BatchMode') = 2 then
    begin
      MovieName := GetField(fieldURL);
      if Pos('imdb.com', MovieName) = 0 then
        MovieName := '';
    end;
If your URL Custom Field Tag is "imdblink", change the following line

Code: Select all

      MovieName := GetField(fieldURL);
into

Code: Select all

      MovieName := GetCustomField('imdblink');
It should do the trick.
But with this method, you must repeat this each time the script will be updated.

Posted: 2015-01-11 12:03:13
by Teebee
thnx, that would be quicker indeed.