BPM logic to send a warning if a field size is greater than a certain number of characters

This may seem a little odd, but I'm looking for a way to send an alert when a particular text field contains more than 15 characters.

The field size is set for more than 15 characters (and it's OK when the field is larger), but in certain cases, I'd like to send an alert when the size of the field is greater than 15 characters.

I know I can restrict the field size in Studio, but it would truncate all of the records.  I don't want to prevent the entry when it's greater that 15, but I do want to send an alert (only when other condition are met).

  

Parents
  • Hi ,

    To do this, you need to create another field on the module to assess this criteria via Sugar Logic formulas. You could create a custom text field in Studio with a formula like the following (Note: this field does not need to be on any layout in order to function):

    ifElse(greaterThan(strlen($field_name),15),"Yes","No")

    The formula would check the contents of $field_name to see if it is more than 15 characters and if so, store a value of 'Yes'. If it is 15 or less characters, it stores a value of 'No'.

    With that field in place, you could then create a process definition with 2 start events:

    1. The first start event is for new records only where your Sugar Logic custom field has a value of 'Yes'
    2. The second start event is for updated records only where your Sugar Logic custom field changes to a value of 'Yes'

    Both start events would then flow into your process to send the notification.

    Chris

Reply
  • Hi ,

    To do this, you need to create another field on the module to assess this criteria via Sugar Logic formulas. You could create a custom text field in Studio with a formula like the following (Note: this field does not need to be on any layout in order to function):

    ifElse(greaterThan(strlen($field_name),15),"Yes","No")

    The formula would check the contents of $field_name to see if it is more than 15 characters and if so, store a value of 'Yes'. If it is 15 or less characters, it stores a value of 'No'.

    With that field in place, you could then create a process definition with 2 start events:

    1. The first start event is for new records only where your Sugar Logic custom field has a value of 'Yes'
    2. The second start event is for updated records only where your Sugar Logic custom field changes to a value of 'Yes'

    Both start events would then flow into your process to send the notification.

    Chris

Children