Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

FmtSetField

  • Last UpdatedJul 18, 2023
  • 1 minute read

Sets data in a field of a format template. After you have set all the fields, you can build the formatted string with the FmtToStr() function.

Syntax

FmtSetField(hFmt, Name, Data)

hFmt:

The format template handle, returned from the FmtOpen() function. The handle identifies the table where all data on the associated format template is stored.

sName:

The name of the format template.

Data:

Field data.

Return Value

0 (zero) if successful, otherwise an error is returned.

FmtGetField, FmtToStr, FmtOpen

Example


hFmt=FmtOpen("MyFormat","{Name}{Desc, 20}",0);

FmtSetField(hFmt,"Name", "CV101");

FmtSetField(hFmt,"Desc","Raw Coal Conveyor");

Str =FmtToStr(hFmt);

! Str will contain "CV101 Raw Coal Conveyor".

See Also

Format Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in