Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009
    Posts
    2

    Unanswered: Delete everything left of a semicolon....

    I am new to this and I have two questions/issues. I have this code:
    stringVar CallMemo;
    CallMemo := {tbl.col};
    Right(CallMemo, InStr(CallMemo, ";") -1)

    How I would like it to function is to delete everything before the first semicolon and leave the rest of the memo field. Instead I get the bottom part of the memo field - whatever the instr count is obviously (not all the remaining text after the first .

    Also, is there a process that can be incorporated to ignore a memo field if it does not start with a left bracket and contain a semicolon?

    thank you!

  2. #2
    Join Date
    May 2009
    Posts
    5

    Thumbs up

    I think you can use MID function i.e MID(String,Start,LEN),So your code can be written as
    stringVar CallMemo;
    CallMemo := {tbl.col};
    MID(CallMemo, InStr(CallMemo, ";") +1)
    this would consider the string from the first ";".
    for the Second issue ignore meaning you want to suppress ?
    if you want to suppress then right click on the field and suppress (formula)
    MID({field},1,1)<>"(" and instr({field},";")<=0
    this formula would check if the memo field contains "(" as the first character and the INSTR will check if the field contains ";" .if both conditions satisfies the n the field will be suppressed.

    try the solutionl.

  3. #3
    Join Date
    May 2009
    Posts
    2
    I did up using the MID code without a variable. I will try the supression, thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •