if No: I need to upload a front and back of a file (2 files) ==> 2 files will be sent
if Yes: I need to upload only one file (only front) ==> only 1 will be sent
So as you can understand, I have 2 attachement categories: frontX and backX:
the frontX will be used in both yes or no cases; if yes I will upload a file in frontX and if no I will upload another one.
the backX will be used only in case no; if I click on yes, it should be reset (to not submit it)
All in all, whenever I click on yes or no, I need to remove what I uploaded in frontX and backX.
my question: how to remove the attachement uploaded when I click on yes or no, So I will not confuse the needed attachement that will be sent.
Hi @AmiraF34: Hope you are using traditional UI. In such case, can you please check OOTB activity “DeleteAttachment” whether it can help you? You may need to pass pzinskey of Link and attachment class.
Hi @AmiraF34: The parameter passed to “DeleteAttachment” will be keys for “Link-Attachment” and “Data-WorkAttach-File” specific to the file. So it will do the deletion based on the parameter passed.
Please give a try on this for your scenario and let us know if you are facing any issues.
Please see the History tab of the rule for more details on how the parameters to be used.
@ArulDevan In the attached screenshoot of the setup of Yes/No radio button, could you tell me please where I can give the specific attachement category to the file to be deleted ? I cannot figure out what I should give as parameters to relate the file category which will be deleted.
Hi @AmiraF34: The activity mentioned will delete based on pzinskey of Link and file. In your case if you have the values available in a page, then you can use them. If not, you may need to create a wrapper activity which does following
Specify the parameters required for D_AttachmentList
Loop D_AttachmentList to identify which attachment to be deleted and get the necessary parameters (key for LINK-ATTACHMENT and DATA-WORKATTACH-FILE)
Call delete attachment outside the loop using the parameters gathered / Call pyDeleteAttachment within the context of the loop