Insert new records into catalog

If you need help on how to use the program
Post Reply
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Insert new records into catalog

Post by fulvio53s03 »

Is there a way to insert empty records into an existing catalog?
(Obviousely I know I could create a catalog with a certain number of records, fill them with a script's extracted informations and then import it into my catalog.)
thanks.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Insert new records into catalog

Post by antp »

You mean by script?
There is a "AddNewMovieToQueue" function from the documentation, I guess it does what you want (that was added by Mickaël back then).
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Insert new records into catalog

Post by fulvio53s03 »

That is just what I needed! :clapping:

Edit:
executed in script:
simply:
AddNewMovieToQueue;
and it's OK!
:innocent:
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Insert new records into catalog

Post by fulvio53s03 »

My script is not quite perfect.
I write a script to insert movies but it writes 2 with the second empty.
Please, where is my mistake?

Code: Select all

(***************************************************

Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/

[Infos]
Authors=Fulvio53s03
Title=$INSERT_FILM
Description=prova creazione nuovi records
Site=
Language=IT
Version=1.0
Requires=4.2
Comments=inserisce 2 record (Debug)
License=GPL
GetInfo=1
RequiresMovies=1

[Options]

[Parameters]

***************************************************)

program Insert_film;
var
  loop, num: integer;
  sorgente: string;
//
//MAIN PROGRAM
//
begin
  if loop = 0 then
     begin
     setfield(fieldsource, 'third');
      sorgente := '3' + getfield(fieldsource);
      loop := loop+1;
      AddNewMovieToQueue;
     end;
end.
:cry:
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Insert new records into catalog

Post by antp »

I don't see the issue: it fills a field in the current movie and then adds a new one :??:
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Insert new records into catalog

Post by fulvio53s03 »

I didn't explain well what I want: I want to load a catalog with a certain number of records, filling the fields with values ​​extracted from html pages, initially having an empty catalog :ha:
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Insert new records into catalog

Post by antp »

But you always have already at least one record (even if empty) when you start running the script
Post Reply