ghengis Posted August 21, 2007 Posted August 21, 2007 Hi, I need some help. I have a notes field that has ¶ characters in it. I would like to be able to replace ¶ with carriage returns so that my notes are not bunched up. See below for example: Title: correct target audience, req. copy of BXL¶Description: ¶Title: DS: has not read the info. ring tuesday¶Description: ¶Title: DS-ring early next week¶Description: ¶Title: DS-Ringing bck, has not read BXL yet¶Description: ¶Title: DS-Patrick, int. but not for4-6 weeks¶Description: How can I do this?
AudioFreak Posted August 21, 2007 Posted August 21, 2007 You could just use a replace function on the field and use this as the calculation. Substitute(Your Field; ¶ ; ¶&¶&¶) That will add 3 returns where 1 is now. But you may also want to consider breaking off the notes to a seperate related table if there are too many and many more will be added. Michael
ghengis Posted August 21, 2007 Author Posted August 21, 2007 Thanks I will try it and let you know how I get on. This database is just a test DB that I'm using to experiment with. I'm trying to improve my scripting knowledge. :
ghengis Posted August 21, 2007 Author Posted August 21, 2007 Sorry to be a pain but should I use replace field contents and then use the substitute (my field;¶;¶&¶&¶)
mr_vodka Posted August 21, 2007 Posted August 21, 2007 For the replace field contents script step, there is a target field which would be the field that you are trying to change, and under that button is another where you can choose to specify the result option. Once you click that, a popup will display, where you can choose 'Replace with calculate result'. That is where you put substitute (YourField; ¶;¶&¶&¶)
ghengis Posted August 21, 2007 Author Posted August 21, 2007 I thought that was the case but this doesn't replace the ¶ in my field. At the moment field looks like this Title: Sent email¶Description: From: Peter Woodvine¶To: [email protected] I would like it to look like this Title: Sent email Description: From: Peter Woodvine To: [email protected] I know this is really simple but I'm stuck big time!
AudioFreak Posted August 21, 2007 Posted August 21, 2007 Comment that does exactly what he wants, but what does the "" do in this? Michael
mr_vodka Posted August 21, 2007 Posted August 21, 2007 Its an escape character. It seems as though his Pilcrow was literal, so it had to be escaped in order to substitute it out. I didnt realize that it was a literal pilcrow either until his followup post.
ghengis Posted August 21, 2007 Author Posted August 21, 2007 Thanks guys. my fault I should have explained myself better. What's a Pilcrow?
AudioFreak Posted August 21, 2007 Posted August 21, 2007 Thanks for the explanation Vodka. A Pilcrow = ¶ Michael
ghengis Posted August 21, 2007 Author Posted August 21, 2007 Excellent it worked! I spent ages trying to figure this out. Maybe I can help you out some day. Thanks again. I can sleep now.
Recommended Posts
This topic is 6305 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now