Skip to main content
July 25, 2023
Solved

How to get document Id in Text Doc From template smart service?

  • July 25, 2023
  • 4 replies
  • 0 views

Hi,

I am using Text Doc From Template smart service in my process and it is creating the document as per our requirements but we need document Id in my process.

Please help how we get the document Id in the smart service.

We have tried with the above configuration but it returns the document name.

    Best answer by stefanhelzle0001

    This is exactly what I tried to explain. In Appian, variables of type "Document" internally store the ID, but are displayed to you with the name.

    What do you need the ID for? Appian will automatically cast that value to an integer whenever needed. And if you think you need the ID displayed on screen, use tointeger().

    4 replies

    stefanhelzle0001
    Brainy
    July 25, 2023

    Appian stores the ID in that process variable and displays it to you as the name of the document. But the PV contains the ID.

    July 25, 2023

    Thanks for your reply.

    We are getting the document name not the Id in the PV.

    stefanhelzle0001
    Brainy
    July 25, 2023

    This is exactly what I tried to explain. In Appian, variables of type "Document" internally store the ID, but are displayed to you with the name.

    What do you need the ID for? Appian will automatically cast that value to an integer whenever needed. And if you think you need the ID displayed on screen, use tointeger().