Have you got a solution for 1?
You can use javascript:
Add the following into the
macro in style.dm:
function format_filesize(bytes) {
var filesize = bytes + " bytes";
if (bytes > 1048576) {
filesize = Math.round(bytes / 1048576.0) + " MB";
}
else if (bytes > 1024) {
filesize = Math.round(bytes/1024.0)+ " kB";
}
document.write(filesize);
}
Then in your format statement, instead of [FileSize] use
<script language="javascript"
type="text/javascript">format_filesize([FileSize])</script>
Hopefully this will work, unless I have a typo :-)
Cheers,
Katherine
DTMartin wrote:
> Hello,
>
> I have two questions.
>
> 1. Is there a format statement that shows KB instead of just bytes? Right
> now my format statement use ([ex.FileSize] bytes) For large files this
> looks cumbersome
>
> 2. When doing a search across collections is there a format feature that
> allows me to display which collection the file came from?
>
> Thanks for your help
>
> Dwight
>
>
> |