Skip to content
🚀 Rapid Application Development with the App Builder

getColumnValue(columnName)

Retrieves the current value of the specified column.

Scope: FORM

Parameters

ParameterTypeDescription
columnNamestringThe name of the database table column.

Parameter columnName can be omitted in form column hooks.

Return Value

TypeDescription
anyThe value of the specified column.
undefinedReturned if the columnName is not found.

✨ Example of a preFormSubmit using getColumnValue

Prevents updates for the customer with ID 103.

js
((mode, getColumnValue, setValidationError, unsetValidationError) => {

	const error = "Customer 103 cannot be updated!"
	const customerNumber = getColumnValue("customerNumber")

	if (customerNumber == 103) {
		// Set validation error
		setValidationError("customerNumber", error)
	} else {
		// Don't forget to reset!
		unsetValidationError("customerNumber")
	}

})

✨ Example of a postFormSubmit using getColumnValue

Sends a notification after a new record is successfully inserted.

js
((responseCode, mode, getColumnValue) => {

	if (responseCode === "OK" && mode === "INSERT") {
		// Send notification about new customer
		const customerNumber = getColumnValue("customerNumber")
		window.open("https://mydomain.com/send-notification/" + customerNumber)
	}

})