1 Reply Latest reply on Sep 29, 2014 10:45 AM by philmodjunk

    GetValue function for non-carriage return key?



      GetValue function for non-carriage return key?


      Hi, I am currently developing a task organizer that can help me turn my brainstorm work from another software called "workflowy" into actual list of delegatable task for my employees. Here is what I would like to do:

      Field setup:

      Field 1 - Description

      Field 2 - Type

      Field 3 - Employee


      For the input I will be chunking a huge list of text into a field with each different item seperated by a carriage return.

      There are 3 possibility with each item in the input text.

      1. brainstorm content #issue

      (that means this content is classified as an issue)

      2. brainstorm content #task 

      (that means this content is classified as a task)

      3. brainstorm content #task @employee 

      (that means this content is classified as a task, and it assigned to a specific employee)


      What i would like to do is to make a script that can generate a record with description as brainstorm content, then detect the word after # and set it as type, then finally detect the word @ and set the word after it as employee.

      The current problem I am facing is that I tried to use GetValue to detect it, but GetValue only detect carriage return so I am having a hard time trying to figure out how to detect the other symbol.

      I am guessing this topic is somewhat related to text extraction but I am not sure where to begin, are there any function out there that I could use to detect # and @? or maybe some work around that can do the intended function?

      Thanks in advance


        • 1. Re: GetValue function for non-carriage return key?

          By "chunking" does this mean that you are pasting or importing this data?

          If not, then you should enter the data into separate fields from the start and that will save you a lot of trouble. A script can parse the data as you need, but it will rely on accurate and consistent formatting. Data entry errors in such a "chunk" can result in your script failing to correctly parse the text.

          Here's one way that you might parse this data:

          Set Variable [$Line ; value: Substitute ( GetValue ( YourTable::ChunkField ; $K ) ; ["@" ; ¶ ] ; ["#" ; ¶ ] )]


          GetValue ( $Line ; 1 ) will return the text to the left of #. Specify a 2, and you get the text between # and @ or after # if there is no @. 3 will return either the text after @ or null if @ was not used.

          This assumes that # is always used but @ may or may not be used. (If you use a @ and don't use #, The text after @ will be returned via using 2 as your second parameter.)

          Caulkins Consulting, Home of Adventures In FileMaking