Vendors setup with no GL controls bpm

epicor version 9.05.701

i’m writing a bpm so when a new vendor is created an error occurs if the GL controls are left blank.
The tables in question are Vendor and EntityGLC
The joins are vendor.company=entityglc.company AND vendor.vendornum = entityglc.key1

I am using the condition “the number of rows in the template query is not less than 1”
Could anybody help me with the syntax?

This isn’t doing the trick:
for each Vendor no-lock , each EntityGLC no-lock outer-join where (String(Vendor.VendorNum) = EntityGLC.Key1 and EntityGLC.GLControlCode = “” )

if anybody has a similar customer version, i can just swap the table name to vendor…

Also tried the following but no joy.
for each Vendor no-lock , each EntityGLC no-lock outer-join where (String(Vendor.VendorNum) = EntityGLC.Key1 and vendor.company = entityglc.company and entityglc.relatedtofile = “Vendor” and EntityGLC.GLControlCode = “” )

The problem is that the Vendor record will ALWAYS be created first and THEN the EntityGLC record after the Vendor record is saved. This means you can’t stop the first save.
Instead, I would default all Vendors to be Inactive and prevent a user from making it Active if the GL Control Code does not exist.