Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Get filename from Watched folder start point

Avatar

Level 2

I have a watched folder as a start point and I can use the

symbols %F and %E in order to save the output documents in the Result folder.

This is easy.

What I cannot do, is getting in a string variable the same filename in order to use it within the Process:

Is it possible?

I would like to exploit this filename to discriminate the activities that the file have to make...

Thanks you as usual!

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can add a setValue and use the getDocAttribute method to get some attributes about the document variable that contains the file that was dropped.

For example:

/process_data/@tmpString =  getDocAttribute(/process_data/@docXML, "basename")

Jasmin

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

You can add a setValue and use the getDocAttribute method to get some attributes about the document variable that contains the file that was dropped.

For example:

/process_data/@tmpString =  getDocAttribute(/process_data/@docXML, "basename")

Jasmin

Avatar

Level 2

thank you Jasmin, your answer is correct and now it works!

only I don't understand why my way didn't work...

Instead of a setValue, I used directly a INSERT SQL activity with getDocAttribute(/process_data/@docXML, "basename") as parameter: as is, it didn't work!

As you suggest, if I put a setValue between the Watched folder startpoint and the INSERT SQL activity (now with the populated string as parameter), it works...

Bah!

Thank you again!

Fabio

Avatar

Level 10

It could be a bug with the SQL operation.

I think your solution should have worked.

Jasmin