Page 1 of 1
SetCustomField type mismatch error
Posted: 2013-07-07 22:45:25
by al0203
If you have an integer or real CustomField and you try set a value in this field it returns me type mismatch error.
The description of the function says:
procedure SetCustomField(fieldTag: string; value: string);
Stores a value in the specified custom field of the current movie.
Is it not possible to use this function with other variables different from string?
Posted: 2013-07-08 05:24:33
by soulsnake
Hi al0203,
You can not use SetCustomField function with an integer or real value directly. You have to convert integer or real value in string using this functions:
- IntToStr(value: integer): string;
- FloatToStr(vaue: double): string;
AMC will check the input string value and convert/format it automatically according to field type.
Soulsnake.
Posted: 2013-07-08 05:41:52
by al0203
soulsnake wrote:Hi al0203,
You can not use SetCustomField function with an integer or real value directly. You have to convert integer or real value in string using this functions:
- IntToStr(value: integer): string;
- FloatToStr(vaue: double): string;
AMC will check the input string value and convert/format it automatically according to field type.
Soulsnake.
Ok, I understand, thank you.
Posted: 2013-07-09 08:30:24
by al0203
soulsnake wrote:Hi al0203,
You can not use SetCustomField function with an integer or real value directly. You have to convert integer or real value in string using this functions:
- IntToStr(value: integer): string;
- FloatToStr(vaue: double): string;
AMC will check the input string value and convert/format it automatically according to field type.
Soulsnake.
Which is the name of the field that store the Date Added information?
Is it a string store yyyy-mm-dd?
Posted: 2013-07-09 09:13:43
by antp
fieldDate
It is a string, yes, either in that format or Windows' local format: check the other if one does not work

(but it is probably that format)