Trying to count number of records meeting certain criteria and write integer to custom field
I would like to count the number of records in "module1" meeting a certain set of criteria, then take that number of records and write to a custom field on "module2". Something along the lines of :
- SELECT * from module1
- WHERE module1.phase = module2.phase &
- module1.builderId = module2.builderid &
- module1.subdivisionId = module2.subdivisionId &
- module1.status = 'Sold'
Count number of records received in a query similar to that and write to module2.customfield1.
Would like to know if something like this is possible within deluge? I was hoping to set this on a scheduled workflow on module2 running every hour.