Editorial Workflows

Validate Current Document for Not Empty

public workflow

Install Workflow

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: This routine makes sure that your current file is not empty. If it is, it shows an error and stops the routine. The idea is to use this as a subroutine of a larger routine that's more specific to your situation. I'm using this routine as a sub routine of two other routines, currently.

Make sure that when you're setting this up as a subroutine, you specify that it can stop the main routine. Otherwise this won't accomplish anything as a subroutine. It'll just show the validation alert and then stop and your main routine will carry on oblivious to the error.

Shared by: Martyn Chamberlin

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Document Text ?
Folded Text
  • Include
  • Replace with:
Remove Whitespace ?
  • Trim leading/trailing whitespace
  • Remove empty lines
Set Variable ?
Variable Name
entry
Value
Input
If… ?
Run the block if
entry
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Show Alert ?
Title
Message
Write something first!
Button 1
Ok
Output Value
Button 2
(don't show)
Output Value
Button 3
(don't show)
Output Value
Show Cancel Button
OFF
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
OFF
Message
Stopped
…End If
Console Output ?
Text
entry