2 Replies Latest reply on Nov 4, 2013 7:29 PM by Tom Smith

    Get Folder variables in Convert task script

    Tom Smith

      Hi all,


      I'm having trouble making a EPDM convert task script that grabs a variable from the folder data card where the file resides.  I found this snippet in a KB solution that works for file data card variables, but can't seem to get to the folder variables.  I can get the iEdmFolder7 object, but can't assign the folder to a IEdmEnumeratorVariable5 because I can't load references in a convert script.  


      here's the snippet that grabs file card values:


      Private Function GetVariableValue(FilePath, VariableName, Configuration)

          On Error GoTo ErrHand

          Dim File As Object

          'Get the interface of the file (and its parent folder)

          Dim Folder As Object

          Set File = vault.GetFileFromPath(FilePath, Folder)

          'Obtain the variable interface

          Dim pEnumVar As Object

          Set pEnumVar = File.GetEnumeratorVariable

          Dim Value As Variant

          If pEnumVar.GetVarfromDB(VariableName, Configuration, Value) Then

              GetVariableValue = Value


          GetVariableValue = ""

          End If

          Exit Function


          Dim ename As String

          Dim edesc As String

          vault.GetErrorString Err.Number, ename, edesc

          Log "GetvariableValue error" & vbCrLf & ename & vbCrLf & errdesc

      End Function


      How do I get to the folder variables?