Workflow Example: Text [Get First or Last Line]

This workflow returns the content of either the first or the last line of a string of text.

The workflow being by generating a number of unique lines of content (by using a sequence number and some input about how many lines you wish to have). The result is stored in a variable called Content and displayed via a Quick Look action with the full set of lines between double quotes.

The content is then split (by new line) into a list and you are asked whether you would like to retrieve the first or the last line of the text (which would correspond to the first or last list item). Simple list item actions specifying "First Item" or "Last Item" respectively then retrieve the desired line of text and it is displayed braced in double quotes.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>