Skip to content
ToolShedby Wasim Shaikh

Veeva Vault Criteria VQL Guide: Reference Constraints, {{this.field}} Tokens & Sharing Rules

Wasim · 27 Nov 2026

Inside the Veeva Vault Admin UI, you often need to filter selectable records or restrict access without writing a full API query. That is where Criteria VQL comes in.

Unlike full VQL queries executed over the REST API, Criteria VQL omits SELECT, FROM, and WHERE—you write only the filter expression itself.

Interactive Companion Tool: Build and validate Criteria VQL expressions with {{this.field_name}} tokens in your browser using our Veeva Vault Criteria VQL Generator.


1. Where Criteria VQL Is Used in Vault Admin

  1. Reference Constraints: Restrict which parent or related records users can pick in a lookup field (e.g., showing only active countries for the current study).
  2. Custom Sharing Rules: Grant or restrict record access based on field values (e.g., country__vr.name__v IN ('United States', 'Germany')).
  3. Query Object Rules: Filter related object or document sections on page layouts.

2. Dynamic Reference Constraints with {{this.field_name}}

Static constraints filter by fixed values (status__v = 'active__v'). Dynamic Reference Constraints use {{this.field_name}} to bind a field value from the current record being edited:

study__v = {{this.study__c}}
  AND status__v = 'active__v'

In this example, when a user selects a site or country record, Vault dynamically filters options to those matching the current record's study__c field.


3. Common Criteria VQL Mistakes to Avoid

  • Including SELECT or WHERE: Criteria VQL is only the conditional expression; omit SELECT ... FROM ... WHERE.
  • Using UI Labels Instead of API Names: Always use lowercase Vault API names (status__v, phase__v, country__vr.name__v).
  • Missing Quotes on String Values: Wrap string literals in single quotes ('active__v'), and wrap IN lists in parentheses (('United States', 'Germany')).

Official References

Wasim Shaikh

About the author

Wasim Shaikh is a UI/UX developer and front-end engineer with 15+ years of experience, based in Ahmedabad, India. He specializes in Liferay, React, Angular, Next.js and Tailwind CSS.

Keep reading

Veeva · 27 Nov 2026Salesforce SOQL to Veeva VQL Cheat Sheet: Migrating Legacy Veeva CRM QueriesVeeva · 27 Nov 2026Veeva CLM HTML5 Package Structure & JS API Guide (PromoMats & Vault CRM)Veeva · 27 Nov 2026Veeva eTMF Risk-Based QC & EDL Guide: How to Calculate Audit Readiness