Is there a way to display and edit the contents of an Appian Document in the UI through webContentField component or by any other means?

I have a requirement to display the contents of appian document on the UI so that user can edit and update the document. I tried using the 18.1 webcontent field but it did not work. Have someone tried the same?

  Discussion posts and replies are publicly visible

Parents
  • Edit Document Properties Smart Service
    a!editDocumentProperties(document, name, description, onSuccess, onError)

    There is a smartservice available that has a corresponding SAIL friendly function you can use, unfortunately, it only lets you update the document's name & description (but not who created/uploaded it or when). Since you would be running it in SAIL, it may give non-admin users problems if they don't have the correct rights (since in a PM you can force the node to run as the process creator). You might have to pull the document's info and allow the name/description to be edited but not make the actual change until after the form is submitted.

    I haven't figured out an easy way to change the "Created By" value. This probably isn't an issue for you, but a few times I found a need for this and couldn't readily do it.

    You can get the document's info from the normal document() function or the smartserviec plugin: Content Details By UUID (6 functions in there including one by id#).

    getcontentobjectdetailsbyid(228694)

    Content Object [Name: capslock.jpg,
    UUID: _a-0000e0bf-9911-8000-ac7a-680000680000_242115,
    Parent: 22 Dispute Doc Folder, Parent Id: 228029,
    Type: Document, Created by: rhartwic,
    Created on: 2018-06-05 21:29:13.0,
    Last updated by: rhartwic,
    Last updated on: 2018-06-05 21:29:13.0,
    Latest version: 1, State: Active Published,
    Internal file name: accdocs3\178436\10069963.jpg]

    I haven't found an obvious database table where Appian stores the document's metadata. If you found one you could try updating the data in the table, though there is a risk that this could cause corruption. The data may also be stored in the kdb files in which case you would have to only use the exposed/approved functions. Maybe Appian has some docs for manipulating the data via Java code.
Reply
  • Edit Document Properties Smart Service
    a!editDocumentProperties(document, name, description, onSuccess, onError)

    There is a smartservice available that has a corresponding SAIL friendly function you can use, unfortunately, it only lets you update the document's name & description (but not who created/uploaded it or when). Since you would be running it in SAIL, it may give non-admin users problems if they don't have the correct rights (since in a PM you can force the node to run as the process creator). You might have to pull the document's info and allow the name/description to be edited but not make the actual change until after the form is submitted.

    I haven't figured out an easy way to change the "Created By" value. This probably isn't an issue for you, but a few times I found a need for this and couldn't readily do it.

    You can get the document's info from the normal document() function or the smartserviec plugin: Content Details By UUID (6 functions in there including one by id#).

    getcontentobjectdetailsbyid(228694)

    Content Object [Name: capslock.jpg,
    UUID: _a-0000e0bf-9911-8000-ac7a-680000680000_242115,
    Parent: 22 Dispute Doc Folder, Parent Id: 228029,
    Type: Document, Created by: rhartwic,
    Created on: 2018-06-05 21:29:13.0,
    Last updated by: rhartwic,
    Last updated on: 2018-06-05 21:29:13.0,
    Latest version: 1, State: Active Published,
    Internal file name: accdocs3\178436\10069963.jpg]

    I haven't found an obvious database table where Appian stores the document's metadata. If you found one you could try updating the data in the table, though there is a risk that this could cause corruption. The data may also be stored in the kdb files in which case you would have to only use the exposed/approved functions. Maybe Appian has some docs for manipulating the data via Java code.
Children
No Data