Batch field entry?

If you need help on how to use the program
Post Reply
DerekLee1
Posts: 6
Joined: 2008-01-29 20:30:17

Batch field entry?

Post by DerekLee1 »

Is there a way to batch add data into fields? For example, I have different racks of movies and would like to put into a field maybe the 'source' field?) "rack 1, rack 2", etc. to show the location of that particular movie. However, it appears I'll have to do this one movie at a time. I'd like to be able to select a group of movies, and type my entry in ONCE and have it populate that same field for every movie. Is this possible, and I'm just overlooking something obvious?

Thanks much!
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

You can do that with scripting.

Code: Select all

program NewScript;
const
  value = 'Rack1';
begin
  setField(fieldSource, value);
end.
Run it on all movies or only selected once and it will fill field source with what is stored in value. Be sure to make a backup of your movie database before you try to modifiy it with scripts ;)
the_observer
Posts: 62
Joined: 2009-11-12 05:53:14

Post by the_observer »

Hi all.

In continuation of the previous useful post this is what i try to do.

I use Media Type field to store in which Hard Disk i keep my movies.
Now i have bought a disk and changed the location of the movies.

With the above instructions i have concluded that i should make and run the below script with the movies i select :

Code: Select all

program MassReplace;
const
  value = 'NewValue';
begin
  setField(fieldMedia Type, value);
end. 
The problem is that when i press F6 i dont see the above script (named MassReplace)

I bet it is something easy but i just cannot find it :(
Any suggestions?

Thank you 4 your time reading this.

Regards,
The_Observer

P.S. The first time i tried this i had the same problem.So i changed the name inside

Code: Select all

program MassReplace;
to be identical with the file name and this seemed to work since then i was able to see the script (although it was greyd out).Probably it was not the cause because again the script is not showing.
Then i thought it should be from language filter show i pressed the "Check All" button.Well it appeared once.Next time i pressed F6 it was not there again.Really weird.
the_observer
Posts: 62
Joined: 2009-11-12 05:53:14

Post by the_observer »

Ok fixed.

The problem was that i was pressing F6 to see scripts while i should press Shift+F6 (show it from menu)


Although now i have a new problem.

When i run the script it says :



Error in expression at line 5

My humble opinion cause i dont know much of programming is that should be the space between fieldMedia Type because when i tried the script with another field ,one with only one word and no space inbetween it worked (c.c. fieldSource)

Any suggestions please?

Thank you 4 your time reading this.

Regards,
The_Observer
Last edited by the_observer on 2010-04-23 11:15:02, edited 1 time in total.
the_observer
Posts: 62
Joined: 2009-11-12 05:53:14

Post by the_observer »

Ok fixed.

I just deleted the space thus i changed fieldMedia Type to fieldMediaType

Sorry for the disturbance (if any)

Regards,
The_Observer
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

the_observer wrote:Ok fixed.

The problem was that i was pressing F6 to see scripts while i should press Shift+F6 (show it from menu)
Just a note on that: F6 (or the button "get information from internet") only shows scripts that have script option "get information from internet" set "True". You can find that option on script editor, when you hit preferences button there.
the_observer
Posts: 62
Joined: 2009-11-12 05:53:14

Post by the_observer »

That is very enlightening cause it was pretty bizarre to me the different behavior of F6 vs shift+F6

Regards,
The_Observer
Post Reply