Short answer:
1. Yes for Workflow.
2. No for Forms.
However, direct connections are coming soon and will hopefully fill that gap.
Long Answer:
Yes, You can use the Remote Agent to connect to local databases:

and perform lookups into Workflow using a rule that references the data query configured:

Forms does not see data query connections in the lookup Rules:

So you won't be able to configure that lookup.
To set up a Laserfiche Remote Agent to connect to a SQL database, follow these steps:
1. Install and Configure the Remote Agent by:
-
Access Process Automation: Navigate to the Integrations page in Laserfiche Cloud.
-
Create a Remote Agent:
-
Click Remote Agents in the left pane.
-
Click New to create a new remote agent.
-
Enter a name and description for your remote agent.
-
Click Create.
-
Configure the Remote Agent:
-
On the configuration page, create queues and add the Data Query plugin.
-
Create workers that will perform the data queries.
-
Ensure the workers are installed on machines within your network that can access the SQL database.(doc.laserfiche.com)
Note: Ensure you are using remote agent workers that are version 11.7.2405.42009 or higher. (doc.laserfiche.com)
2. Create and Configure the Data Source
-
Access Data Sources: In Process Automation, select Data Sources and click New.
-
Define the Data Source:
-
Enter a name for the data source.
-
Optionally, add a description.
-
Select Microsoft SQL Server as the database type.
-
Choose the remote agent you configured earlier.
-
Specify Connection Details:
-
Enter the server name (e.g., servername\instance or IP address).
-
Specify the port number (default is 1433 for SQL Server).
-
Provide the database name.
-
Enter authentication details (username and password).
-
Verify and Create:
Note: If connecting to a named SQL Server instance, ensure the correct port is specified or leave the port field empty to use the SQL Server Browser service. (answers.laserfiche.com)
3. Utilize the Data Source in Processes
Note: Remote agents operate by pulling work from a queue in the cloud. Therefore, they are not suitable for real-time data lookups in forms. For scenarios requiring real-time data access, consider alternative approaches. (answers.laserfiche.com)
Additional Considerations
-
Multiple Data Sources: A single remote agent can service multiple data sources, provided it has the necessary permissions and network access to each database. (answers.laserfiche.com)
-
Large Databases: When dealing with large databases or those with numerous tables, the verification process might time out. Creating a smaller subset of the database with only the necessary tables can help mitigate this issue. (answers.laserfiche.com)
-
Security: Ensure that the remote agent has the appropriate permissions to access the SQL database and that all communications are secured as per your organization's policies.