Hi,
I have a scenario for the closed requests when i am reopening whatever the documents that i have attached in old closed case after reopening new case for correction all the old case documents needs to displayed under new case other attachments tab so the documents is displaying correctly
But now in those documents whatever the document type is "MMRF" i want that document needs to be removed and it should not display under other attachments tab after reopening case could you please suggest on this how to achieve tried using remove or delete document of that specific type but didn't worked
Below is the pv variable data that i am passing to reopened case:
pv!checkRequest_cdt.attachments.documentId saving it in other attachments pv variable target
attachments is one column which is nested CDT in checkRequest cdt
The data in cdt will be like below in that below if documentType = MMRF that one i dont want to be displayed under other attachment for reopening case
attachments=[attachmentId=58917, requestId=27808, fileType=xlsx, documentTypeIndex=, documentType=Request File, documentId=315155, DocLink=0902e],[attachmentId=58918, requestId=27808, fileType=pdf, documentTypeIndex=, documentType=Other Request Attachment, documentId=315156, midasDocLink=0902e71f86ef340f],[attachmentId=58919, requestId=27808, fileType=pdf, documentTypeIndex=, documentType=MMRF, documentId=315161, DocLink=0902e],
Discussion posts and replies are publicly visible
Hello dharanik2600 To remove the MMRF type document from the pv! variable you can follow below steps:-Iterate through the pv!checkRequest_cdt.attachments list using a for loop.Inside the loop, for each attachment, check if the documentType equals "MMRF".If the document type is "MMRF", create a new temporary list (filteredAttachments). Add all attachments except the MMRF one to this list.After the loop finishes, assign the filteredAttachments list back to the pv!checkRequest_cdt.attachments.Also you try using filter functionhttps://docs.appian.com/suite/help/24.1/fnc_looping_filter.htmlLet me know if that works for you.
You can try below piece of code on your pv!attachment
remove( pv!attachments, wherecontains( "MMRF", touniformstring( index(pv!attachments, "documentType", {}) ) ) )