Skip to main content
sarahb0004
August 23, 2021
Solved

How to save the fila name of the uploaded document in CDT

  • August 23, 2021
  • 3 replies
  • 0 views

Hello everyone!

I created a scrip task to extract data from a .txt file and save it to CDT. However, my CDT also has a column to save the file name of the .txt file where I extracted the data. Is it possible to do it? If yes, can you explain how? Thank you.

    Best answer by selvakumark

    Hi,

    You can use the document() function to retrieve the document name.

    docs.appian.com/.../fnc_scripting_document.html

    3 replies

    selvakumark
    Participating Frequently
    August 23, 2021

    Hi,

    You can use the document() function to retrieve the document name.

    docs.appian.com/.../fnc_scripting_document.html

    sarahb0004
    August 23, 2021

    Hi there,

    Tried this and it worked. Hopefully this works too once the uploading came from an SFTP smart plug in. For now I am testing only manual uploads. You think this can work too if my file will be fetched through Receive File Over SFTP? Thanks in advance.

    selvakumark
    Participating Frequently
    August 23, 2021

    This will work if the file is stored in Appian. I hope you are storing the file in a folder once you retrieve it.