Page 1 of 1

Problem with Custom Fileds in script

Posted: 2012-03-01 10:27:10
by jlatk
In the script I'm trying to use the code below:

Code: Select all

Value := GetMaterials(Page, 'muzyka');
  	Zmienna := CustomFieldExists(fieldCustomMusic)
    if (Length(Value) > 0) then
      begin
        if CustomFieldExists(fieldCustomMusic) then
          begin
            SetCustomField(fieldCustomMusic, Value)
          end
       else
          begin
            Value := GetField(fieldActors) + #13#10 + 'Muzyka: ' + Trim(Value) + '; ';
          	SetField(fieldActors, Value);
        	end;
      end;
Unfortunately, getting an error:

Code: Select all

unknown identifier: FIELDCUSTOMMUSIC at line 814
That is in line:

Code: Select all

Zmienna := CustomFieldExists(fieldCustomMusic)
A similar problem I have with the function SetCustomField. The field fieldCustomMusic is defined as a String.

How, then use the custom fields?

Please help!

Posted: 2012-03-01 11:01:03
by antp
You have to put the tag between quotes,
SetCustomField('CustomMusic', Value)
if your fiend has CustoMusic defined as tag

Posted: 2012-03-04 22:45:54
by jlatk
It works. Council helpful. Post close.