Skip to main content

i need to send email to group of users in SharePoint also the email should contain attachment , the problem that the attachment control is not mandatory field so if the user not upload the attachment, email has not been sent ? pls advice

Hi Mohamed

 

Are you using SmartForms and do you need to make the attachment control mandatory? If so you can do this (let me know and I will provide details).

 

Or is your email failing if the attachment is not present? If so how are you sending the email - via a workflow or from a form?


the scenrio that the workflow is triggered after the user click on submit button on smart form , so the workflow should send mail to group of users with the attachment if the user upload one in smart form, the problem here is that the workflow was not working right if the user didn't attach any file and it was working if the user uploaded attachment , seems it throw an exception if the attachment control is null


In this case you can use an IF condition to check if the attachment is empty. If it is empty then return an empty string, otherwise return the attachment (using the Files - Get File From Content) function).

 

 

 

 


where i can make if statement, if you can share screen shot it will be great


 

Drag an IF condition into the attachment field

12074iFFC69067B453C145.png


Reply