English > Support

Value Converter

(1/1)

rick.ca:
This is great fun getting tweets about new plugins, but what is this for and how does it work?


--- Quote ---Value Converter needs a configuration file named valueconf.cfg that contains entries in following format fieldnumber|value|change to.
--- End quote ---

fieldnumber
Number and not name? If so, is this message still a valid reference for field numbers?

value and change to
Valid constants, I pressume. Is it the value of the whole field, or can it be a substring? For example, will it work like a "search and replace" to replace specified substrings in a memo field?

Does this change the data in the database, or just how it's displayed?

nostra:

--- Quote ---Number and not name?
--- End quote ---

It is always with numbers first, because easier to implement ...  ::)


--- Quote ---If so, is this message still a valid reference for field numbers?
--- End quote ---

Use this file http://www.videodb.info/bin/Fields.pas. I will update the file in case numbers change.


--- Quote ---Valid constants, I pressume
--- End quote ---

Anything


--- Quote ---s it the value of the whole field, or can it be a substring? For example, will it work like a "search and replace" to replace specified substrings in a memo field?
--- End quote ---

It does not work as find and replace, but there will be such an option later. It works with whole values, the plugin can separate values in multivalue fields like genre.


--- Quote ---Does this change the data in the database, or just how it's displayed?
--- End quote ---

Yes, it changes data in the database!

rick.ca:

--- Quote ---Valid constants, I presume.
--- End quote ---

By this, I meant constants but not variables. This is strictly for replacing specified fixed values with "change to" values, not for converting all my budget and box office data from USD to Euros. Right?


--- Quote ---the plugin can separate values in multivalue fields like genre.
--- End quote ---

So I could change the genre "romance" to "chick flick," and a "comedy, romance" movie would become "comedy, chick flick"? 8)


--- Quote ---Yes, it changes data in the database!
--- End quote ---

I suppose we need to be careful then. ;)

How is it invoked—just by the DLL and valueconf.cfg being present when the database is loaded? Is the idea to leave the configuration so the values will be changed whenever a plugin or script "updates" the fields to their old values?

nostra:

--- Quote ---By this, I meant constants but not variables. This is strictly for replacing specified fixed values with "change to" values, not for converting all my budget and box office data from USD to Euros. Right?
--- End quote ---

Right, but converting USD in Eur is an interesting idea. I'll consider implementing such a possibility as well.


--- Quote ---So I could change the genre "romance" to "chick flick," and a "comedy, romance" movie would become "comedy, chick flick"? Cool
--- End quote ---

That's correct


--- Quote ---How is it invoked—just by the DLL and valueconf.cfg being present when the database is loaded? Is the idea to leave the configuration so the values will be changed whenever a plugin or script "updates" the fields to their old values?
--- End quote ---

All general type plugins are executed with the application itself and ended with it. Such plugins run always in backgound. This particular plugin changes values right before they are going to the database file every time you edit data manually or using a plugin/script.

Navigation

[0] Message Index

Go to full version