I had some inconsistent data that I needed to separate in to records. It was like a big block of Document history.
The code to update the document history was written by several developers, so it wasn't always logged in the same way..
One developer logged it like this:
Date -- Who took action - Action
Another developer logged it like this:
Who took action (date )
Status Changed: From old status to new status
Details: details
------------------------------------------------------
so.. I needed to export each update in the text as a separate row of data..
I messed around w/some sample data in button using the code below:
actionTaken := "05/21/2009 -- Betsy Thiede -- lskdjflksdjf
05/21/2009 -- Betsy Thiede -- sdjkflsdf jlskdfj
Betsy Thiede (05/26/2009 12:35:24 PM)
Status Changed: From 'Open' to 'On Hold
Details: sddsfsd
------------------------------------------------------
Betsy Thiede (05/26/2009 12:36:09 PM)
Status Changed: From 'On Hold' to 'Open
Details: sdfdsf
------------------------------------------------------
05/26/2009 -- Betsy Thiede -- sdfsdfs
05/26/2009 -- Betsy Thiede -- Every good boy does fine. All good things come to those who wait. For every door that closes, a window opens. My mother told me to pick the very best one and I pIpicked you
05/26/2009 -- Betsy Thiede -- 1
2
3
4
5";
aTakenExploded := @Explode(actionTaken;@NewLine);
@Prompt([OkCancelList]: [NoSort];"Selection box";"aTakenExploded";"";aTakenExploded);
temp := "";
howmany := 0;
@For(n := 1; n <= @Elements(aTakenExploded); n := n + 1;
@If(@Contains(aTakenExploded[n];" -- ");@Do(howmany := howmany + 1;temp := @Trim(temp : ("~" : aTakenExploded[n])));@Contains(aTakenExploded[n];"(");@Do(howmany := howmany + 1;@Trim(temp := temp : ("~" + aTakenExploded[n])));@Contains(aTakenExploded[n];"------------------------------------------------------"); temp; temp := temp : ("¥" + aTakenExploded[n])));
temp := @Trim(@ReplaceSubstring(@Explode(@Implode(temp);"~");"¥";""));
@Prompt([OkCancelList]:[NoSort];"Data Entry"; "temp"; "";temp)
Once I got it working, I ran an agent on the data and then exported it properly..
Your suggestions for articles about Designer
16 hours ago

