SetCustomField type mismatch error

If you need help on how to use the program
Post Reply
al0203
Posts: 72
Joined: 2013-02-27 05:24:17

SetCustomField type mismatch error

Post 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?
soulsnake
Posts: 756
Joined: 2011-03-14 15:42:20
Location: France

Post 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.
al0203
Posts: 72
Joined: 2013-02-27 05:24:17

Post 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.
al0203
Posts: 72
Joined: 2013-02-27 05:24:17

Post 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?
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

fieldDate
It is a string, yes, either in that format or Windows' local format: check the other if one does not work :D
(but it is probably that format)
Post Reply