You are viewing limited content. For full access, please sign in.

Question

Question

VBScript - trying to retrieve the full file name from a "For Each File" activity in a workflow into a vbscript

asked on December 30, 2015

VBScript - trying to retrieve the full file name from a "For Each File" activity in a workflow into a vbscript.  Not sure on writing the script on the classes to use...

I need help on Dim the variable

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.SqlClient
Imports System.Text
Imports System.IO
Imports Laserfiche.Workflow.Activities.ForEach.Controllers

Namespace WorkflowActivity.Scripting.Script
    '''<summary>
    '''Provides one or more methods that can be run when the workflow scripting activity is performed.
    '''</summary>
    Public Class Script1
        Inherits ScriptClass90
        '''<summary>
        '''This method is run when the activity is performed.
        '''</summary>
        Protected Overrides Sub Execute()
            'Write your code here.
            dim FileName as Laserfiche.Workflow.Activities.ForEach.TokenValueInformation = GetTokenValue("ForEachFile_CurrentFile_Full Name")

            file.delete(FileName)
        End Sub
    End Class
End Namespace
 

 

0 0

Replies

replied on December 30, 2015

Wouldn't that just be a string?

dim FileName as String = GetTokenValue("ForEachFile_CurrentFile_Full Name")

If you don't mind my asking, what are you trying to accomplish deleting the results of For Each File? Workflow cleans up when the instance completes, you'd just be deleting temporary files that Workflow would delete anyway.

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.