• Andy Coustick-Deal
  • NEWBIE
  • 30 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Good people of the developer community,

I am trying to convert a custom text Name field into a truncated version which replaces with spaces with hyphens and gets rid of periods and parentheses.  I'm using the Find + Substitute combo to get this done, but I'm finding something strange.  It is doing everything I am telling it to, except it is sometimes deleting the first letter of each word as well!

For example: "Mr. (John) Smith" should become "Mr-John-Smith".  However it is becoming "r-ohn-Smith"

The code is below:

SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(

Display_Name__c, MID(Display_Name__c, FIND(")", Display_Name__c, 1), 1), ""),

MID(Display_Name__c, FIND("(", Display_Name__c, 1), 1), ""),

MID(Display_Name__c, FIND(".", Display_Name__c, 1), 1), ""),

MID(Display_Name__c, FIND(" ", Display_Name__c, 1), 1), "-")


Can anyone advise what I'm doing wrong here?  I could understand if it was not doing one of the substitutions correctly and replacing the first letter instead, but it is doing all of the substitutions correctly, so I don't see why its making extra changes.

Thanks in advance,
Andy
Hello all,

Hope you can help.  Writing one of my very first workflows (hooray for newbies) and I want the workflow to be triggered if it has been 6 weeks since a particular status was changed.  We have a field which records the date the status changed (here called Date__c).  Will the following rule criteria work as a formula?

Date__c <= (TODAY()-42)

I think this should activate if the date in the Date__c field is from 6 weeks ago or longer.  Is this right?  There are no syntax errors so it seems good to me.  I just don't know if the criteria formula box will work out what I'm saying.  Any advice?

Thanks!
Hello all,

I have a question born of paranoia for the floor.

We have a number of workflows which trigger off emails based on certain fields changing, e.g moving the Record to the Confirmed status.  These workflows are all set to "Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria."

So my question is: if I need to change the owner of a load of these records, and the owner is NOT one of the fields which affect the workflow, then there shouldn't be any way of emails being sent out?  Basically, I want to know I can update other parts of these records and not end up sending emails to all sorts of people who should not be getting any.

As far as I can see, there are absolutely no links between the record owner and any of the workflows, beyond being part of the mail merge on the emails which would be sent out.  So I think this is just me being incredibly paranoid.  Any help would be appreciated.

Thanks!
Good people of the developer community,

I am trying to convert a custom text Name field into a truncated version which replaces with spaces with hyphens and gets rid of periods and parentheses.  I'm using the Find + Substitute combo to get this done, but I'm finding something strange.  It is doing everything I am telling it to, except it is sometimes deleting the first letter of each word as well!

For example: "Mr. (John) Smith" should become "Mr-John-Smith".  However it is becoming "r-ohn-Smith"

The code is below:

SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(

Display_Name__c, MID(Display_Name__c, FIND(")", Display_Name__c, 1), 1), ""),

MID(Display_Name__c, FIND("(", Display_Name__c, 1), 1), ""),

MID(Display_Name__c, FIND(".", Display_Name__c, 1), 1), ""),

MID(Display_Name__c, FIND(" ", Display_Name__c, 1), 1), "-")


Can anyone advise what I'm doing wrong here?  I could understand if it was not doing one of the substitutions correctly and replacing the first letter instead, but it is doing all of the substitutions correctly, so I don't see why its making extra changes.

Thanks in advance,
Andy
Hello all,

Hope you can help.  Writing one of my very first workflows (hooray for newbies) and I want the workflow to be triggered if it has been 6 weeks since a particular status was changed.  We have a field which records the date the status changed (here called Date__c).  Will the following rule criteria work as a formula?

Date__c <= (TODAY()-42)

I think this should activate if the date in the Date__c field is from 6 weeks ago or longer.  Is this right?  There are no syntax errors so it seems good to me.  I just don't know if the criteria formula box will work out what I'm saying.  Any advice?

Thanks!
Hello all,

I have a question born of paranoia for the floor.

We have a number of workflows which trigger off emails based on certain fields changing, e.g moving the Record to the Confirmed status.  These workflows are all set to "Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria."

So my question is: if I need to change the owner of a load of these records, and the owner is NOT one of the fields which affect the workflow, then there shouldn't be any way of emails being sent out?  Basically, I want to know I can update other parts of these records and not end up sending emails to all sorts of people who should not be getting any.

As far as I can see, there are absolutely no links between the record owner and any of the workflows, beyond being part of the mail merge on the emails which would be sent out.  So I think this is just me being incredibly paranoid.  Any help would be appreciated.

Thanks!