Update catalog using links in custom field

If you need help on how to use the program
Post Reply
Teebee
Posts: 111
Joined: 2005-06-04 10:46:56

Update catalog using links in custom field

Post 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
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Post 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 ;)
Teebee
Posts: 111
Joined: 2005-06-04 10:46:56

Post 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.
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Post 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.
Teebee
Posts: 111
Joined: 2005-06-04 10:46:56

Post by Teebee »

thnx, that would be quicker indeed.
Post Reply