Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003

    Unanswered: quick one - parsing text, which calculation functions...

    This should be a relatively quick one...

    Basically I have a text field (input), into which I paste the contents of an email (it is a form response from the website - i want to use cdml but the owners don't want to spend 700 on FM unilimited).

    If you can help me with this one problem I will then be able to write the entire calculation.

    In another field called name, I want to parse through the email looking for the name that the user typed on the form.
    I know this can be done using the position function, and I've managed to get the number of the character in the text that is the first on that line.
    In the email it reads

    YourName: x

    where x is whatever the user typed followed by a double line break.

    So far I've got the starting position of the line I want by using this:
    Position( input, "YourName: ", 1, 1)
    But how do I actually just get the data between the "YourName: " and the double line break.
    It's some crafty combinations of leftwords and left and middlewords etc but I can't work it out.

    The problem I have is that people type in just their first name, both names, 3 names, 4 names so just getting the 2 words following "YourName: " isn't really enough. I need the rest of that line up until the double line break.

    Any help?
    Ideally I hope to solve this over the weekend.



  2. #2
    Join Date
    Sep 2003


    The best way to accompish would be to pull all text between the position of the First Name: and the line break. Use the 2 positions to pull the data and use Trim to remove and spaces that may exist

    Hope that helps.

Posting Permissions

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