Page 1 of 1

Insert new records into catalog

Posted: 2023-06-09 15:08:13
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.

Re: Insert new records into catalog

Posted: 2023-06-10 07:19:51
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).

Re: Insert new records into catalog

Posted: 2023-06-10 17:28:35
by fulvio53s03
That is just what I needed! :clapping:

Edit:
executed in script:
simply:
AddNewMovieToQueue;
and it's OK!
:innocent:

Re: Insert new records into catalog

Posted: 2023-06-13 05:00:46
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:

Re: Insert new records into catalog

Posted: 2023-06-13 17:46:04
by antp
I don't see the issue: it fills a field in the current movie and then adds a new one :??:

Re: Insert new records into catalog

Posted: 2023-06-15 04:43:39
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:

Re: Insert new records into catalog

Posted: 2023-06-17 08:10:06
by antp
But you always have already at least one record (even if empty) when you start running the script