Define database SQL hook

When defining a form template field, selecting h (Database SQL Hook) as the Data Type allows you to enter SQL statements for EmpowerHR to run and then display the results in the form.

You should limit the SQL to return only a single column and row.  If more than one column or row is produced, EmpowerHR displays a warning message with the results.

Display format options explained

The h (Database SQL Hook) field has different Display Format rules than other fields.  Here they are explained:

Display Format
Explanation
cDisplay the value as a character string with no formatting
d
Display the value as a date

fx.y

Display the value as a number with x digits before, and y digits after, the decimal point.

x and y are numbers between 0 (zero) and 9.

m
Display the value as a monetary amount.
r
Display the value as a rate.

See SQL for self service forms in the EHR Technical User Guide  for examples of SQL statements and tags.

If you don't have access to the EHR Technical User Guide, you can log an iHelp request and we will provide login credentials to you.





Next topic

Define table field



© 2023 Fusion5. All rights reserved.