Grooper 21.00.0077 is available as of 8-30-2023! Check the  Downloads Discussion  for the release notes and to get the latest version.
Grooper 23.00.0030 is available as of 9-11-2023! Check the Downloads Discussion for the release notes and to get the latest version.

DirectCast(Item, BatchFolder).NativeMineType = "application/pdf"

We have error when use this command below in version 2021.00.0075 at should submit expression. Is there new command for version 2021.00.0075?

 DirectCast(Item, BatchFolder).NativeMimeType = "application/pdf"


  • jgernerjgerner Posts: 2

    Inspecting MIME type

    • This example would submit the task when the object's (folder) represents a native PDF or the second if its mime type is PDF
      • DirectCast(Item, BatchFolder).IsNativePDF
      • DirectCast(Item, BatchFolder).AttachmentMimeType = "application/pdf"
  • DungVuDungVu Posts: 86
    Does these expressions work on scope batch level? I have tried this expression on the spawn batch step but it does not work. What can be substituted for "DirectCast(Item, BatchFolder).AttachmentMimeType = "application/pdf" in the batch level scope?
  • GrooperGuruGrooperGuru Posts: 480 admin
    As you know, the Spawn Batch activity is designed to execute at the Batch level. Therefore, when working with a Should Submit Expression, "Item" would be referring to the Batch itself, not a subfolder. I don't believe there is any way that your Batch itself is a PDF. The PDF is likely on a Level 1 folder within the batch. If that is the case, this expression can not work. You would need to write an expression that looks at the child of the batch instead to determine if that object's Attachment Type is PDF.
    Matt Harrison
    Product Manager
    [email protected]
Sign In or Register to comment.