Requirement is to display different images for different records in the record l

Requirement is to display different images for different records in the record list view. Plan is to store the image in Documents and then have the Doc ID of the document placed in the corresponding record in the SQL Server database.

What is the correct data type and length for storing the document identification number? On a related note, when the application is moved to higher environment, will the Doc ID be retained as is or should I have a process to validate this?...

OriginalPostID-131507

OriginalPostID-131507

  Discussion posts and replies are publicly visible

Parents
  • I suggest you store the UUID instead, this way even if the document gets deleted and replaced you won't need to update the DB. For this you will need the Content Details by UUID plug-in forum.appian.com/.../summary


    1. You can store the UUID of the document using the following expression to retrieve it and then store by your preferred mean in a column of type text (e.g.varchar) in your table

    =keyval(getcontentobjectdetailsbyid(document(ri!myDoc,"id")),{"UUID"},":",",")

    2. You can later "transform" it in a document by retrieving the UUID from the DB and converting it to a document object:

    =todocument(keyval(getcontentdetailsbyuuid(pv!retrievedUUIDFromTable),{"Id"},":",","))
Reply
  • I suggest you store the UUID instead, this way even if the document gets deleted and replaced you won't need to update the DB. For this you will need the Content Details by UUID plug-in forum.appian.com/.../summary


    1. You can store the UUID of the document using the following expression to retrieve it and then store by your preferred mean in a column of type text (e.g.varchar) in your table

    =keyval(getcontentobjectdetailsbyid(document(ri!myDoc,"id")),{"UUID"},":",",")

    2. You can later "transform" it in a document by retrieving the UUID from the DB and converting it to a document object:

    =todocument(keyval(getcontentdetailsbyuuid(pv!retrievedUUIDFromTable),{"Id"},":",","))
Children
No Data