MCPcopy Create free account
hub / github.com/apitable/apitable / getCellValueString

Method getCellValueString

packages/widget-sdk/src/model/record.ts:105–111  ·  view source on GitHub ↗

* Gets the cell value of the given field of record, and convert to string type. * * @returns * * #### Example * ```js * const stringValue = myRecord.getCellValueString(myNumberFieldId); * console.log(stringValue); * // => '42' * ```

(fieldId: string)

Source from the content-addressed store, hash-verified

103 * ```
104 */
105 getCellValueString(fieldId: string): string | null {
106 const state = this.wCtx.widgetStore.getState() as any as IReduxState;
107 const datasheetId = this.datasheetId;
108 const field = Selectors.getField(state, fieldId, this.datasheetId)!;
109 const cellValue = this._getCellValue(fieldId);
110 return Field.bindContext(field, state).cellValueToString(cellValue, { datasheetId });
111 }
112
113 /**
114 *

Callers 2

record.spec.tsFile · 0.45
handleCellValueFunction · 0.45

Calls 3

_getCellValueMethod · 0.95
getFieldMethod · 0.45
cellValueToStringMethod · 0.45

Tested by

no test coverage detected