IResource variable for Extract DOcument Data

Hi all,

I was trying to use the activity “Extract Document Data”. The use case is as follows: I want to find some information via the prompt inside a document that I have as a string variable. The problem is that the input file field in Extract Document Data has to be of the type IResource. I have tried a lot of things, transform my variable, do it via file path exists, etc. But the activity will not stop giving an error. Any ideas?

image

Kind regards.

1 Like

Hi,

Can you try either of the following?

LocalResource.FromPath

OR

PathExists activity

Regards,

1 Like

Hi @Alejandro_Velasco_Guerrer

Assign activity: documentContent = “Your document content as a string”

Write Text File activity:

  • Input: documentContent
  • File Path: “C:\Temp\YourTempFile.txt”

Assign activity: filePath = Directory.GetFiles(“C:\Temp”, “YourTempFile.txt”)(0)

New Document activity:

  • FilePath: filePath
  • Output: documentResource

Extract Document Data activity:

  • Input: documentResource
  • Other properties: Configure the activity as per your requirements

Thank you guys @Yoichi @sanjay3, I already have it.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.