LabKey SQL provides the function extensions covered in this topic to help Java module developers and others writing custom LabKey queries access various properties.


Returns a module property, based on the module and property names. Arguments are strings, so use single quotes not double.

moduleProperty values can be used in place of a string literal in a query, or to supply a container path for Queries Across Folders.



You can use the virtual "Site" schema to specify a full container path, such as '/home/someSubfolder' or '/Shared':

FROM Site.{substitutePath moduleProperty('EHR','EHRStudyContainer')}.study.myQuery

The virtual "Project." schema similarly specifies the name of the current project.


Provides access to public static final variable values. The argument value should be a string.

Fields must be either be on classes in the java.lang package, or tagged with the org.labkey.api.query.Queryable annotation to indicate they allow access through this mechanism. All values will be returned as if they are of type VARCHAR, and will be coerced as needed. Other fields types are not supported.



To allow access to MYFIELD, tag the field with the annotation @Queryable:

public class MyConstants
public static final String MYFIELD = "some value";

Related Topics

Was this content helpful?

Log in or register an account to provide feedback

expand allcollapse all