Subject: Solution…
Hi,
you have to look into the subform named “m_attachmentsarea” in the inotes/forms8.nsf-database…
the formula between the table-start and table-end tags is wrong…
Here is the wrong one: (line-delimited for better reading g)
oFiles:=@AttachmentNames;
oFileSizes:=@AttachmentLengths;
sOutput:=“”;
sUnid:=@Text(@DocumentUniqueID);
@For(n := 1;
n <= @Elements(oFiles);
n := n + 1;
sFilename:= oFiles[n];
sLink :=sLinkString;
sURL:=“…/…/0/”+sUnid+“/$File/”+sFilename+“?OpenElement&FileName=”+sFilename+ @if(FolderName=“($SoftDeletions)”;“&OpenSoftDeleted”;“”);
sFileParts:=@Explode(sFilename;“.”);
sFileExt:=@UpperCase(sFileParts[@Elements(sFileParts)]);
sCroppedFilename := @if(@Length(sFilename)<33;sFilename;@Left(sFilename;33-@Length(sFileExt)-4)+" …(“+sFileExt+”)");
nSize:=oFileSizes[n];
sUnits:=@If((nSize/1073741824)>.5;" GB";@If((nSize /1048576)<0.5;@If((nSize/1024)<1;" B";" KB");" D"));
nFileSize:= @If((nSize/1073741824>.5);nSize/1073741824;@If((nSize /1048576)<0.5;@If((nSize/1024)<1;nSize;nSize/1024);nSize/1048576));sFileSizeText:=@Text(@Round(nFileSize;0.1))+sUnits;mArrow:=“<img alt="Mehr" class="" style="border:0px;" height="11" width="7" src="@{@ReplaceSubstring(sTransparentSrc;‘transparent.gif’;‘mArrow.png’)}"/>”;
sTableEntry:= ‘’+ ‘’+ ‘’+mArrow+‘’+ ‘’+sFileSizeText+‘’+ ‘’+sCroppedFilename+‘’+ ‘’+ ‘’;sOutput:=sOutput+sTableEntry;“”);
sOutput
… and now the “RIGHT” one…
oFiles:=@AttachmentNames;
oFileSizes:=@AttachmentLengths;
sOutput:=“”;
sUnid:=@Text(@DocumentUniqueID);
@For(n := 1;
n <= @Elements(oFiles);
n := n + 1;
sFilename:= oFiles[n];
sLink :=sLinkString;
sURL:=“…/…/0/”+sUnid+“/$File/”+sFilename+“?OpenElement&FileName=”+sFilename+ @If(FolderName=“($SoftDeletions)”;“&OpenSoftDeleted”;“”);
sFileParts:=@Explode(sFilename;“.”);
sFileExt:=@UpperCase(sFileParts[@Elements(sFileParts)]);
sCroppedFilename := @If(@Length(sFilename)<33;sFilename;@Left(sFilename;33-@Length(sFileExt)-4)+" …(“+sFileExt+”)");
nSize:=oFileSizes[n];
sUnits:=@If((nSize/1073741824)>.5;" GB";@If((nSize /1048576)<.5;@If((nSize/1024)<1;" B";" KB");" D"));
nFileSize:= @If((nSize/1073741824>.5);nSize/1073741824;@If((nSize /1048576)<.5;@If((nSize/1024)<1;nSize;nSize/1024);nSize/1048576));sFileSizeText:=@Text(@Round(nFileSize;.1))+sUnits;mArrow:=“<img alt="Mehr" class="" style="border:0px;" height="11" width="7" src="@{@ReplaceSubstring(sTransparentSrc;‘transparent.gif’;‘mArrow.png’)}"/>”;
sTableEntry:= “<a class="entryLink" href="”+sURL+“" target="_blank">”+ “<span class="attRow">”+ “<span class="arrowArea">”+mArrow+“”+ “<span class="attSize" title="”+sFileSizeText+“">”+sFileSizeText+“”+ “<span class="attTitle" title="”+sFilename+“">”+sCroppedFilename+“”+ “”+ “”;sOutput:=sOutput+sTableEntry;“”);
sOutput
A screenshot of ONE failing point:
If you paste the wrong one into an agent and try to “save” you get the same result as in web access…
There are some entries like “0.5” and “0.1” → that should be “.5” and “.1”
If you replace the wrong “0.x” to “.x” and save the subform (+restart of the http task) you will get the correct result and no error message anymore…
Good luck,
Martin