Question:
How to create VQL Product-dependent constraints for a Drug Product for Events in Vault RIM?
Answer:
Drug Product fields can be constrained by Product fields since they have a parent-child object relationship. In order to limit the number of available Drug Products when creating an Event Drug Product record, follow these steps:
- Go to the Event Drug Product object page (Admin --> Configuration --> Objects --> Event Drug Product)
- Enter the Drug Product object field and press Edit.
- Add the following formula to the Criteria VQL section: id IN (SELECT drug_product__v FROM product_pharmaceutical_
products__rimr WHERE product__rim = {{this.event__rimr.impacted_ product__rim}})
NOTE: The Drug Product selected in the Event Drug Product joint is dependent on the Product selected in the Event. If no Product is selected in the Event object, no Drug Products appear in the Event Drug Product.
Related Documentation:
Vault Criteria Constraint Documentation: Constraining Related Object Records