Problem with Custom Fileds in script

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
jlatk
Posts: 5
Joined: 2009-02-15 23:17:32

Problem with Custom Fileds in script

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

Post by antp »

You have to put the tag between quotes,
SetCustomField('CustomMusic', Value)
if your fiend has CustoMusic defined as tag
jlatk
Posts: 5
Joined: 2009-02-15 23:17:32

Post by jlatk »

It works. Council helpful. Post close.
Post Reply