Question:
How to retrieve the value of document-object relationship fields through Vault VQL?
Answer:
Document-object relationship fields are the document fields that reference objects.
A query in VQL is different and depends on whether or not the field is a multiple-values field.
- If the field is the single-value field, the field value can be retrieved by the form: document_{field_name}__vr for standard objects or document_{field_name}__cr for custom objects in VQL.
Example: SELECT document_department__cr.name__v FROM documents
- If the field is the multiple-values field, the user needs to retrieve the value through the inner query in the VQL.
Example: SELECT (SELECT name__v FROM document_department__cr) FROM documents
Related Documentation:
N/A