osiris612mb Posted June 20, 2005 Posted June 20, 2005 This is my script:: Go to Record/Request/page [first] Loop Go to Field[select/Perform; Time::Description] Perform Find/Replace[ """; "'' ;Replace all] Goto Record/request/page [next; exit after last] end Loop What it is supposed to do is go to the description field and find all quotation marks and make them a single apostrophe. Because when exporting we can't have quotation marks in the comma-seperated file. So instead of seeing Last night I read the book, "The Perfect Storm". it would read, Last night I read the book, 'The Perfect Storm'. BUT it doesn't work!!! Can a field be changed like this or should we just have a second field that uses the Substitute[] and export that field instead??? Thanks in advance.
RalphL Posted June 20, 2005 Posted June 20, 2005 Should the script step read: Perform Find/Replace[ """; "''' ;Replace all]
Rob 7 Collins Posted June 20, 2005 Posted June 20, 2005 If [ IsEmpty ( Get ( ScriptParameter ) ) ] Go to Record/Request [ first ] Perform Script [ "this_script" ; Parameter: Substitute ( Time::Description ; """ ; "'" ) ] Else Loop Set Field [ Time::Description ; Get ( ScriptParameter ) ] Commit Record/Request Go to Record/Request [ next ; Exit After Last ] End Loop End If *edit: i forgot the commit record/request : likely what your script is missing too.
osiris612mb Posted June 20, 2005 Author Posted June 20, 2005 Ralph: That didn't seem to work either. In a calulation it does but not within a find/replace. Rob: That worked althought I left out the If[] Thanks for the help!
Rob 7 Collins Posted June 20, 2005 Posted June 20, 2005 Rob: That worked althought I left out the If[] I'm getting so used to ScriptParameters that right now I don't touch anything without them. Its very useful in cases where you want to do the same thing, but drop to Find mode before setting fields.
Recommended Posts
This topic is 7098 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