Display attachment sizes in B, KB, MB, and GB

Format the output of @AttachmentLengths into a more useful result.
Lotus Formula


tmp := @AttachmentLengths;

@If(
	tmp < 1024 ; 		@Text(tmp;"F,0") + " bytes";
	tmp < 1048576 ; 		@Text(@Round(tmp/1024);"F,0") + " KB";
	tmp < 1073741824 ; 	@Text(@Round(tmp/1048576);"F,0") + " MB";
						@Text(@Round(tmp/1073741824); "F,0") + " GB"
)

Written by fbrefere001

Posted by fbrefere001 on Monday February 18, 2019