function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chaitanya salesforcecrmchaitanya salesforcecrm 

substitute back slash in formula

I have a formula where i need to substitute forward slash "\" with double forward slash "\\".below is the formula 

HYPERLINK("file:///"&SUBSTITUTE(SUBSTITUTE(Project_Files_Path__c," ","%20"),"\","\\"),Project_Files_Path__c)

when i check the syntax i am getting below error

User-added image
kindly let me know any suggestions to resolve the issue?
Best Answer chosen by chaitanya salesforcecrm
sfdcMonkey.comsfdcMonkey.com
Hi ,
 its happen beacuse of '\' escape char. use below fourmula
HYPERLINK("file:///" & SUBSTITUTE(SUBSTITUTE(Project_Files_Path__c ," ","%20"),"\\","\\\\") , Project_Files_Path__c )
i hope it helps you.
  Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
sfdcmonkey.com
 

All Answers

sfdcMonkey.comsfdcMonkey.com
Hi ,
 its happen beacuse of '\' escape char. use below fourmula
HYPERLINK("file:///" & SUBSTITUTE(SUBSTITUTE(Project_Files_Path__c ," ","%20"),"\\","\\\\") , Project_Files_Path__c )
i hope it helps you.
  Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
sfdcmonkey.com
 
This was selected as the best answer
chaitanya salesforcecrmchaitanya salesforcecrm
I got the solution for my question.
Thanks piyush_soni for your reply.