Does Passthru HTML work in a Standard Section?

I have some pretty straight forward Pass-Thru HTML in a Computed Text field on a form being used in the Notes Client. The HTML creates a table and works just dandy.

Then I put a Standard Section around it, (because it’s a long table of revision histories) and the passthru doesn’t work anymore.

Why is that happening? How do I fix it?

Thanks,

-Jeff

Subject: Does Passthru HTML work in a Standard Section?

I have had Passthru HTML just up and fail for no real reason. What I did was make the field and remove the PassThru HTML settings. Then just mark them again and it started working again. Go figure!

I’m not sure about the field being in a section having any impact I do not think that I have ever tried that. If not can the field be moved outside the section?

Subject: RE: Does Passthru HTML work in a Standard Section?

I’ve tried setting and re-setting the text as PassThru HTML. I’ve had those same problems (I think Lotus is the king of quircky software). That didn’t work. The problem is unequivocably that the PassThru will not work within the Section (sheesh!).

Yes, the code must be within a section.

-Jeff

Subject: RE: Does Passthru HTML work in a Standard Section?

Hi Jeffrey,

Did you take a look at the source code? If you want, you can mail (part of the) database to martinATbeesign.be - I think I might help you, but I would have to see it myself for this.

Greetings,

Martin Vereecken

http://www.bizzybee.be (Notes blog)

Subject: RE: Does Passthru HTML work in a Standard Section?

Martin, I sent you (part of) the db. I hope you can find the problem (or maybe at least get Lotus to acknowledge it), because I need a solution.

In the meantime, if anyone else has suggestions, I’m all ears.

Thanks,

-Jeff

Subject: RE: Does Passthru HTML work in a Standard Section?

Hi Jeff,

I tried and was able to show passthru within a standard section:

Computed value formula:

endDate := @Today;

startDate := @Adjust(endDate; 0; 0; -12; 0; 0; 0);

editDate := @Explode(@TextToTime(“[” + @Text(startDate) + " - " + @Text(endDate) + “]”));

REM {

@If(

doesNotExist = "";

@Prompt([Ok]; "Test of doesNotExist"; "Not found - you do not need to compare the element [1]");

editDate = "";

@Return("");

""

);

};

@If(

editDate = "";

@Return("");

""

);

editName := "John " + “Bigboote”:“Ya Ya”:“Small Berries”:“Parker”:“Many Jars”:“Whorfin”:“Valuk”:“O’Connor”:“Fish”:“Mud Head”:“Careful Walker”:“Thorny Stick”:“Coyote”;

action := @Explode(@Repeat(“Action string:”; 13); “:”; 0);

oldVal := @Explode(@Repeat(“Old value:”; 13); “:”; 0);

newVal := @Explode(@Repeat(“New value:”; 13); “:”; 0);

HTML := @Implode(

“” +

“” + editDate + “” +

“” + editName + “” +

“” + action + “” +

“” + oldVal + “” +

“” + newVal + “” +

“”

; @NewLine);

HTML

Subject: RE: Does Passthru HTML work in a Standard Section?

I had this problem one time. The section was set to auto collapse. When I changed the section to auto expand, the passthru did work.

One more thing to check.

Subject: RE: Does Passthru HTML work in a Standard Section?

But even if auto-collapsed, it can be expanded. Not sure if this is Jeff’s problem.

Subject: RE: Does Passthru HTML work in a Standard Section?

Hi Cesar. I guess you got my code from Martin (or somethign like that).

Auto-expanding or collapsing the section had no effect. Also, the setting “Show as text when not previewing” had no effect.

What’s different between yours and my versions? I have it in a table, do you? What version of Client do you have, mine is 7.0.2. What else could be different?

Thanks,

-Jeff

Subject: RE: Does Passthru HTML work in a Standard Section?

It may be that the table is the culprit.

Do you mean an HTML table or a table created in Designer?

BTW, I am using 7.0.1 and code for the computed text was kind of borrowed from your original posting here:

http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedweb/cc6c10c5e7357b858525738b00617ec9?OpenDocument

although I did not loop through the elements to create the table.

Subject: RE: Does Passthru HTML work in a Standard Section?

It is an HTML table, but within a tabbed Domino table.

Funny, I’m working on the same table, which I emailed to Martin, so I assumed you were working for the NSA or otherwise got his email .

The result of the Computed Value is follows:

DateEditorActionOld ValueNew Value
11/6/2007 1:05:44 PMJeffrey Schwarzchanged field ClientAAAAAAAAAAACC
11/6/2007 1:05:44 PMJeffrey Schwarzchanged field ProjectNumninety nine99
11/6/2007 1:05:44 PMJeffrey Schwarzchanged field ProjectName999new name
11/6/2007 1:12:07 PMJeffrey Schwarzupdated ProjectDescnew description(blank)
11/6/2007 1:13:22 PMJeffrey Schwarzupdated ProjectDesc(blank)(blank)
11/6/2007 1:13:39 PMJeffrey Schwarzupdated ProjectDesc(blank)(blank)
11/6/2007 1:17:40 PMJeffrey Schwarzupdated ProjectDesc(blank)description

This is displayed two tables deep (I inherited this form with all these tables on it already). The second table is tabbed and this HTMl is on the first tab.

When I tried the Computed value outside of a Domino table, but in the section, it still failed. But outside of the Domino table (or inside a Domino table) and NOT in a section, the HTML displays perfectly.

Could there be a bug in 7.0.2? (Ugh! How is it I find every single bug Lotus has?)

Thanks,

-Jeff

Subject: Does Passthru HTML work in a Standard Section?

it sounds stupid, but have you tried surrounding your PassThru HTML Computed Text with a non-PassThru whitespace character before and after (but within the section)?

Subject: RE: Does Passthru HTML work in a Standard Section?

I don’t care how stupid it sounds if it works. Unfortunately, it didn’t work.

Subject: RE: Does Passthru HTML work in a Standard Section?

Nothing silly like unintended hide-whens, huh? Sometimes when working with tables (especially copy-paste operations), I have seen hide-whens get messed up.

Subject: RE: Does Passthru HTML work in a Standard Section?

Hide-whens are just like PassThru HTMLs when discussing frustrating and hard-to-find quircks. There’s no simple way to tell when text is hidden and with what formula and what spaces here and there do.

Subject: RE: Does Passthru HTML work in a Standard Section?

have you tried this:

  • highlight the section while expanded, including a line before and after, and completely remove PassThru HTML

  • render the HTML in the section using square brackets instead

This is a classic Domino quirk. Every once in a while one of these ridiculous problems shows up and wastes a day of your time:)

Subject: RE: Does Passthru HTML work in a Standard Section?

Yes, I tried using brackets, also.

I’ve also just upgraded to 7.0.3.

Nothing works. If it’s in the section, it just displays the raw HTML, otherwise, it renders the HTML. I wish I could show a picture.

Please help anyone.

-Jeff

Subject: RE: Does Passthru HTML work in a Standard Section?

When all else fails, create a brand new form and try some very simple stuff (like in my example further up this thread). If you can make it work with a simple form, add more complexity to it. I know that it’s not what you wanted to hear but sometimes a complex form gets messed up with hide whens and text properties that don’t seem to respect paragraph boundaries.

Try just the very basic things you have in your “real” form - the table, the passthru HTML and finally the section and make sure you create them form scratch - no copying and pasting.

Subject: Does Passthru HTML work in a Standard Section?

Hi Jeffrey,

I took a look at your database and couldn’t reproduce your problem, so I guess it has to do with the version you’re working with or so.

Anyway, here’s a workaround: write your own expand/collapse code.

I wrote a little article on the subject in my blog: http://www.bizzybee.be/2007/11/08/expandcollapse-sections-a-clientside-cross-browser-solution/

Hope this helps.

Greetings,

Martin Vereecken

http://www.bizzybee.be (Notes blog)

Subject: RE: Does Passthru HTML work in a Standard Section?

Martin, I’m having problems with this solution. Following is what I have. Notice I added two DIV statements, one of which contains the image and text Revision history. The second, which should start off hidden, contains the Computed Value table.

The Images exists in the database, but still do not display on the page. When I click where the images should be, nothing happens. I think I did everything correctly, but am having no luck and do not know where to turn to next.

Thanks,

-Jeff

Passthru HTML:

Revision History

Computed Value:

count := @Elements(editDate);

@If(count <= 0 | @Trim(editDate) = “”; @Return(“”); “”);

@For(i := 1; i <= count; i := i + 1;

HTML := HTML + "<TR ><TD VALIGN=TOP >" + editDate[i] + "</TD>";

HTML := HTML + "<TD VALIGN=TOP >" + editName[i] + "</TD>";

HTML := HTML + "<TD VALIGN=TOP>" + action[i] + "</TD>";

HTML := HTML + "<TD VALIGN=TOP>" + oldVal[i] + "</TD>";

HTML := HTML + "<TD VALIGN=TOP>" + newVal[i] + "</TD>";

HTML := HTML +  "</TR>" + @NewLine);

“<table style="bgcolor:white; border-style:solid; border-width: .06em; border-color:rgb(0,0,0); font-family: arial; font-size: 10px;" width=100%><tr style="background-color: rgb(0,0,0); color:white; font-weight: bold;">DateEditorActionOld ValueNew Value” + @NewLine + HTML + “”

JSHeader (Client, Common Javascript):

function expandCollapseSection(obj,div) {

if(obj.src.indexOf('collapse.gif')!=-1) {

	obj.src='/icons/expand.gif';

	document.getElementById(div).style.display='none';

} else {

	obj.src='/icons/collapse.gif';

	document.getElementById(div).style.display='';

}

}

Note: The only reason I’m using Passthru HTML in a Computed Text field is a workaround. I have to do it this way because creating dynamic tables on the fly in a Notes RichText field does not work correctly.