I have a CDT with a document attribute type, imagine a product catalog CDT, with the name of the product and the image.
As I know, in database this document attribute type is stored by the documentID, so documentID is the reference in the catalloge table database.
The problem is when I deploy this CDT and the catalog content table in other environment, cause this documentID changes, so in the database table the documentIDs that are stored are wrong.
How can I do to reference this document in other environment? No I´m changing manually the document id in the new environment database, but I suppose there´s a less hard method.
Thanks in advance.
Updating document ids manually is obviously a painful method. Instead of that, what you can do is create a constant of document type (array) that points towards the images of the items in a sequential manner. Appending document to that constant can be done manually after adding every item but I will recommend you to use the service "Update Constant" in process model for every time you add a new item. When you need to display the image or the set of images of those items, you can index the constant based on the identifier of that row of item.
This is a way easy method and will not require any manual updation after deployment.
I wanted to show the image by reading the database table because there is where I have the direct relation of the product with his image. By adding a document array constant I loose this relation, but also the relation between productId and arrayPosition is strong enought.
Discussion posts and replies are publicly visible
© 2019 Appian. All rights reserved.