We have quote follow-up reminder emails working fine with one exception - we get the emails even if a quote has been won or lost. I have beaten my head against a wall attempted to use a Condition to test for that but failed miserably, so any help is appreciated. (note: I am generally trying to do as much as possible using widgets other than “Execute Custom Code” since I don’t know C#). The BPM has one variable (string) and has the following steps:
- Condition Widget: Checks for a row being added to ttAlertQue
- Condition Widget: Checks if AlertNum is equal to ‘1030’. If true, then:
- Set Arg/Var Widget: Sets variable ‘quoteNumber’ equal to ttAlertQueRow.AlertText .Substring(7,5)
Example value: Full AlertText is “Quote (12268 ) - Follow Up Date 11/9/2022” and the substring sets the variable to 12268 - Condition Widget: Testing for ‘number of rows greater than 0’ in the designed query.
I am trying to use two Table Criteria:
- first one (no issue): ReasonType = ‘’
- second one (the problem): QuoteHed.QuoteNum = quoteNumber variable
but when I try to save the BPM I get this error:
There is at least one compilation error.
PostTran.Global_Alerts.cs(145,28): error CS0019: Operator ‘==’ cannot be applied to operands of type ‘int’ and ‘string’
I have tried ‘Matches’ for the criteria and that throws
‘Matches’ comparison operator is not supported for ‘System.Int32’ type
Parameter name: compareAs
Should I be using a different type of variable? If I can’t use int or string I am not sure what else to use for quoteNumber. Other ideas or is there other info that is needed to assist? Thanks!
I am also happy to hear other/better ways to do this… but would really like to understand why the above doesn’t work.