olllllllo Posted July 26 Share Posted July 26 I am looking for a way to do the following in JavaScript. The client list provided has a column header of "DROPOFLOCATION" and the column's cells contain a child and sibling name contained in parentheses. Example: Dropofflocation 1089 E 77TH ST (Child Name + Sibling Name) 7618 ABERDEEN AVE (Child Name) I am looking for a way to insert a paragraph return before the first parentheses, so (Child Name + Sibling Name) returns to the line below. This is how I would like it to appear. 1089 E 77TH ST (Name one + Sibling Name) Any ideas on how to code this? Quote Link to comment Share on other sites More sharing options...
olllllllo Posted July 26 Author Share Posted July 26 My coworker came up with this solution: if (Field("DROPOFFLOCATION").indexOf("(") > -1) { return ReplaceSubstring(Field("DROPOFFLOCATION"),"(","<br>("); } return Field("DROPOFFLOCATION"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.