Forum Discussion

GeorgeBramhall2's avatar
GeorgeBramhall2
Qrew Cadet
11 months ago

Eliminating characters from a Text Feild

anyone know what might be wrong with this text formula?

The formula works for 4 variable line items of characters but not this many. The error is pointing at the Pipe character variable. Is there a limit?:

var text brackleft=SearchAndReplace([Project Name],"(","");
var text brackright=SearchAndReplace($brackleft,")","");
var text star=SearchAndReplace($brackright,"*","");
var text Tilde=SearchAndReplace($star,"~","");
var text Acute=SearchAndReplace($Tilde,"`","");
var text Exclamation=SearchAndReplace($Acute,"!","");
var text Asperand=SearchAndReplace($Exclamation,"@","");
var text hash=SearchAndReplace($Asperand,"#","");
var text Percent=SearchAndReplace($hash,"%","");
var text Degree=SearchAndReplace($Percent,"°","");
var text Caret=SearchAndReplace($Degree,"^","");
var text Ampersand=SearchAndReplace($Caret,"&","");
var text Plus=SearchAndReplace($Ampersand,"+","");
var text Equal=SearchAndReplace($Plus,"=",""); 
var text Openbrace=SearchAndReplace($Equal,"{","");
var text Closebrace=SearchAndReplace($Openbrace,"}","");
var text Openbracket=SearchAndReplace($Closebrace,"[","");
var text Closedbracket=SearchAndReplace($Openbracket,"]","");
var text Pipe=SearchAndReplace($Closedbracket,"|","");
var text Backslash=SearchAndReplace($Pipe,"\","");
var text Forwardslash=SearchAndReplace($Backslash,"/","");
var text Colon=SearchAndReplace($Forwardslash,":","");
var text Semicolon=SearchAndReplace($Colon,";","");
var text Quote=SearchAndReplace($Semicolon,""","");
var text Apostrophe=SearchAndReplace($Quote,"'","");
var text Lessthan=SearchAndReplace($Apostrophe,"<","");
var text Greaterthan=SearchAndReplace($Lessthan,">","");
var text Comma=SearchAndReplace($Greaterthan,",","");
var text Period=SearchAndReplace($Comma,".","");
var text Question=SearchAndReplace($Period,"?","");
 
Left($Question,23)


------------------------------
George Bramhall
------------------------------

1 Reply

  • Try eliminating this line here  to see if its the culprit 

    var text Backslash=SearchAndReplace($Pipe,"\","");

    or changing it to 

    var text Backslash=SearchAndReplace($Pipe,"\\","");

    The \ is an escape character so to look for a \ you need two of them.



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------