
Hi All,
I have a situation where I need to remove the last file attached from the attachment control, if a condition returns true.
i.e.:
OnAddFile Event - > if(true,"Remove last file attached from attachment control")
Please guide.
Hi @Anonymous ,
Maybe you could try to select the Attachments Data Card and apply the following formula on its Update property as:
If(conditionresult=true&&CountRows(DataCardValue31.Attachments)>1,FirstN(DataCardValue31.Attachments,Sum(CountRows(DataCardValue31.Attachments),-1)),DataCardValue31.Attachments)When updating attachments and the number of attachments is greater than 1, this formula will not upload the last attachment to the data source.
Best Regards,
Charlie Choi