Simple bpm not firing

That's it! Thank you both for your help!! Good info to know Jose, about Progress and spacing. Explains why it was being seen as a string.

I created what seemed like would be a simple bpm using SalesOrder.Update. It is designed to throw up an informational message if a customer has outstanding invoices over 30 days past due. I encountered a problem with the query not triggering if the statement was InvcHead.DueDate<"today-30" , but would  trigger if it was simply "today". I am completely flummoxed! Any ideas or suggestions would be appreciated. The query in it's entirety is as follows:


for each ttOrderHed,
first Customer where (ttOrderHed.company=Customer.Company and
ttOrderHed.CustNum = Customer.CustNum), each InvcHead where (InvcHead.DueDate<“today”
AND InvcHead.OpenInvoice=TRUE AND InvcHead.CreditMemo=FALSE) and Customer.Company=InvcHead.Company and
Customer.CustNum=InvcHead.CustNum) no-lock


Quotes are used to indicate a string/literal, so I believe you would just need to do the following instead 
InvcHead.DueDate < (TODAY-30)

For example:

for each ttOrderHed, 

first Customer where (ttOrderHed.company=Customer.Company and ttOrderHed.CustNum = Customer.CustNum) no-lock, 
each InvcHead where (InvcHead.DueDate < (TODAY-30) AND InvcHead.OpenInvoice=TRUE AND InvcHead.CreditMemo=FALSE) and Customer.Company=InvcHead.Company and Customer.CustNum=InvcHead.CustNum) no-lock



On Tue, Feb 25, 2014 at 3:38 PM, <melody@...> wrote:

 
<div>
  
  
  <p></p><p>I created what seemed like would be a simple bpm using SalesOrder.Update. It&nbsp;is designed&nbsp;to throw up an informational message if a customer has outstanding invoices over 30 days past due. I encountered a problem with the query not triggering if the statement was <span style="font-size:11pt;">InvcHead.DueDate&lt;&quot;today-30&quot; , but would&nbsp; trigger if it was simply &quot;today&quot;. I am completely flummoxed! Any ideas or suggestions would be appreciated. The query in it&#39;s entirety is as follows:</span></p>


for each ttOrderHed,
first Customer where (ttOrderHed.company=Customer.Company and
ttOrderHed.CustNum = Customer.CustNum), each InvcHead where (InvcHead.DueDate<"today"
AND InvcHead.OpenInvoice=TRUE AND InvcHead.CreditMemo=FALSE) and Customer.Company=InvcHead.Company and
Customer.CustNum=InvcHead.CustNum) no-lock


</div>
 


<div style="color:#fff;min-height:0;"></div>

I thought so too Habib, but if I just use parens, I get the following error message:

TODAY-30 must be a quoted constant or an unabbreviated, unambiguous buffer/field reference for buffers known to query. (7328)



 Are you doing this within a query (number of rows in the designed query) as part of a condition, or as a part of a 4GL/ABL action?  Also, what version of Vantage/Epicor are you on?



On Tue, Feb 25, 2014 at 4:18 PM, <melody@…> wrote:

 
<div>
  
  
  <p></p><p>I thought so too Habib, but if I just use parens, I get the following error message:</p><p>TODAY-30 must be a quoted constant or an unabbreviated, unambiguous buffer/field reference for buffers known to query. (7328)</p>



</div>
 


<div style="color:#fff;min-height:0;"></div>

I'm not in a system to confirm but Progress can be a bit white space sensitive.  Try Today - 30 with spaces on both sides of the operator.

Jim Kinneman
Encompass Solutions, Inc
Melody,
The code Habib gave you is correct it just needs space between TODAY - 30 progress is very picky about spacing

for each ttOrderHed, first 
InvcHead where (InvcHead.DueDate < (TODAY - 30) AND InvcHead.OpenInvoice=TRUE AND InvcHead.CreditMemo=FALSE) and InvcHead.CustNum = ttOrderHed.CustNum AND InvcHead.Company = ttOrderHed.Company.


Jose C Gomez
Software Engineer



T: 904.469.1524 mobile


Quis custodiet ipsos custodes?


On Tue, Feb 25, 2014 at 5:18 PM, <melody@...> wrote:

 
<div>
  
  
  <p></p><p>I thought so too Habib, but if I just use parens, I get the following error message:</p><p>TODAY-30 must be a quoted constant or an unabbreviated, unambiguous buffer/field reference for buffers known to query. (7328)</p>



</div>
 


<div style="color:#fff;min-height:0;"></div>