跳到主要内容

SetValue

Sets field value

Syntax

expression.SetValue(sValue);

expression - A variable that represents a ApiBaseField class.

Parameters

NameRequired/OptionalData typeDefaultDescription
sValueRequiredstringNo description provided.

Returns

boolean

Example

This example sets value to text field.

let doc = Api.GetDocument();
let page = doc.GetPage(0);
let textField = Api.CreateTextField([10, 10, 160, 30]);
page.AddObject(textField);

textField.SetValue('Name Surname');