Hi,
I have a field of user actions, such as below:
Staff Member NF selected by CW
Client Confirmed with HELEN with Ref : 0909004045. Entered by CW
Booking Edited by CW
Staff Cancelled reason working 3 nights wants two days off by KP staff member was NF
Booking Edited by KP
Name Change Set By KP. Name change was NF
Staff Member GM selected by CW
Booking Edited by CW
Name Change done by CW. Name change was NF
Staff Confirmed By SD
Booking Edited by SD
Booking status set to Complete by Server
I need to extract the lines where all instances of the line starting "Staff Member" appear.
I have tried a While formula:
stringVar NewName := {Booking.EditHistoryEventList};
numberVar i := -1;
numberVar Strlen := length (NewName);
numberVar Result := -1;
while i <= Strlen and Result = -1 do
(
stringVar Position:= mid (NewName, i, -1);
if Position = "Staff Member " then
Result := i;
i := i - 1;
);
stringVar NewName2 := mid (NewName, Result+1, (Strlen-Result));
NewName2
But I get the "Start position is less than 1 or not an interger" and it highlights the bold text above.
I have used this formula from a tutorial, without really understanding what it does, so any advice is gratefully recieved.
I am using Crystal 9, reading a Lotus Notes database over an ODBC connection.
I have a field of user actions, such as below:
Staff Member NF selected by CW
Client Confirmed with HELEN with Ref : 0909004045. Entered by CW
Booking Edited by CW
Staff Cancelled reason working 3 nights wants two days off by KP staff member was NF
Booking Edited by KP
Name Change Set By KP. Name change was NF
Staff Member GM selected by CW
Booking Edited by CW
Name Change done by CW. Name change was NF
Staff Confirmed By SD
Booking Edited by SD
Booking status set to Complete by Server
I need to extract the lines where all instances of the line starting "Staff Member" appear.
I have tried a While formula:
stringVar NewName := {Booking.EditHistoryEventList};
numberVar i := -1;
numberVar Strlen := length (NewName);
numberVar Result := -1;
while i <= Strlen and Result = -1 do
(
stringVar Position:= mid (NewName, i, -1);
if Position = "Staff Member " then
Result := i;
i := i - 1;
);
stringVar NewName2 := mid (NewName, Result+1, (Strlen-Result));
NewName2
But I get the "Start position is less than 1 or not an interger" and it highlights the bold text above.
I have used this formula from a tutorial, without really understanding what it does, so any advice is gratefully recieved.
I am using Crystal 9, reading a Lotus Notes database over an ODBC connection.