TreeINFO-For-M365 documentation
    Preparing search index...

    ISDS Box field service — provides programmatic access to ISDS box field values.

    Inherits core field functionality from Field, including:

    The return type of value, getValue(), and getDetailedValue() depends on the field's Multiple configuration:

    • Single-select (Multiple: false, default) — returns a single object or null
    • Multi-select (Multiple: true) — returns an array
    // Single-select field
    const field = tisa.form.field.Isds_Recipient;
    const box = field.value; // IsdsBoxValue | null

    // Multi-select field
    const multi = tisa.form.field.Isds_Recipients;
    const boxes = multi.value; // IsdsBoxValue[]

    // set by raw SP string (id;#name format, newline-separated for multiple)
    field.value = "abc2defg;#Aricoma a.s.";

    // set by space / comma / semicolon separated box IDs
    field.value = "abc2defg xyz3mnpq";
    field.value = "abc2defg, xyz3mnpq";
    field.value = "abc2defg;xyz3mnpq";

    // set by IsdsBoxValue object
    field.value = { id: "abc2defg", name: "Aricoma a.s." };

    // set by IsdsBoxValue array
    field.value = [
    { id: "abc2defg", name: "Aricoma a.s." },
    { id: "xyz3mnpq", name: "Jan Novák" },
    ];

    // clear the field
    field.value = null;
    await field.setValue(null);

    Hierarchy (View Summary)

    Implements

    • IFieldIsdsBox
    Index

    Properties

    description: string

    Gets or sets the description of the field. The description is displayed below the input. If set, it overrides the default description coming from SharePoint. Supports resource keys with the RESX. prefix (e.g. "RESX.MyFieldDescription"). The key is resolved from the form's Resources translation table.

    const { form } = tisa;
    const { myField } = tisa.form.field;
    myField.description = "My Field Description";
    myField.description = "RESX.MyFieldDescription"; // resolved from Resources
    hidden: boolean

    Gets or sets whether the field is hidden.

    internalName: string

    Gets the internal name that is used for the field.

    originalValue: any

    Gets original field value before any changes. This value is not updated when the field value is changed.

    const { form } = tisa;
    const { myField } = tisa.form.field;
    console.log(myField.originalValue);
    readOnly: boolean

    Gets or sets whether the field is read-only.

    required: boolean

    Gets or sets whether the field requires a value.

    title: string

    Gets or sets the title (label) of the field. The title is displayed in the field header. If set, it overrides the default title coming from SharePoint. Supports resource keys with the RESX. prefix (e.g. "RESX.MyFieldTitle"). The key is resolved from the form's Resources translation table.

    const { form } = tisa;
    const { myField } = tisa.form.field;
    myField.title = "My Field";
    myField.title = "RESX.MyFieldTitle"; // resolved from Resources
    typeAsString: FieldType

    Gets the type of the field.

    const { form } = tisa;
    const { myField } = tisa.form.field;
    console.log(myField.typeAsString);
    value: any

    Gets or sets the selected ISDS box(es).

    Getter returns:

    • No selection: null (both single and multi-select)
    • Single-select with selection: IsdsBoxValue
    • Multi-select with selection: IsdsBoxValue[]

    Setter accepts:

    • string — raw SP field format ("id;#name", newline-separated for multiple), or box IDs separated by whitespace, comma, or semicolon
    • string[] — array of box IDs
    • IsdsBoxValue — single box object
    • IsdsBoxValue[] — array of box objects
    • null / undefined — clears the field

    Box IDs are always normalized to lowercase before storing.

    Methods

    • Returns box ID(s) — single string for single-select, array for multi-select, empty for no selection.

      Returns string | string[]

    • Returns box name(s) — single string for single-select, array for multi-select, empty for no selection.

      Returns string | string[]

    • Resolves full ISDS details (type, IČO, address) for the selected box(es).

      Checks session cache first. Any IDs not found in cache are fetched in a single batched API call via getBoxes. Results are stored back to session cache.

      Returns null when no box is selected (both single and multi-select).

      • Single-select with selection: IsdsSearchResult
      • Multi-select with selection: IsdsSearchResult[]

      For boxes where details cannot be resolved (API error or ID not found), the basic info (id + name, empty address) is returned.

      Returns Promise<null | IsdsSearchResult | IsdsSearchResult[]>

    • Returns formatted display value.

      Returns string

    • gets field property from tisaFields (TiSaProvider.tsx)

      Parameters

      • property: string

      Returns any

    • Returns the selected box(es).

      • No selection: null (both single and multi-select)
      • Single-select with selection: IsdsBoxValue
      • Multi-select with selection: IsdsBoxValue[]

      Returns null | IsdsBoxValue | IsdsBoxValue[]

    • sets field property in tisaFields (TiSaProvider.tsx)

      Parameters

      • property: string
      • value: any

      Returns void

    • Sets the selected ISDS box(es).

      Accepts the same input formats as the value setter (see IFieldIsdsBox.value value).

      When the value is set by box ID only (raw string, string[], or separated IDs without a name), the name is automatically resolved: session cache is checked first, then the getBoxes API is called for any uncached IDs. This ensures the field always displays the correct box name.

      Parameters

      • value: FieldIsdsBoxValueSet

        The value to set.

      • OptionaldisableTriggerChange: boolean

        If true, the onChange event is not triggered.

      Returns Promise<void>

      // set by raw SP string
      await field.setValue("abc2defg;#Aricoma a.s.");

      // set by space-separated box IDs (name resolved via cache/API)
      await field.setValue("abc2defg xyz3mnpq");

      // set by string[] of box IDs (name resolved via cache/API)
      await field.setValue(["xr9jj48"]);

      // set by object (name already known, no API call)
      await field.setValue({ id: "abc2defg", name: "Aricoma a.s." });

      // set by array
      await field.setValue([{ id: "abc2defg", name: "Aricoma a.s." }]);

      // clear the field
      await field.setValue(null);