Hide-whens work on a per-line or per-cell basis for showing/hiding content. But what if there are different chunks of content you want to show/hide on the same line, depending on the conditions? For example:
- buttons on a form or page, some of them you want to hide sometimes;
- different status images;
- pieces of text.
Sure, you can find ways with table cells, computed text or computed images. But there’s another way, at least on the web. In the client, I thought I could get it to work in Notes 6.5 earlier, but when I tested in Notes 7 and 8 today, it won’t give me what I want.
Here’s an example situation: imagine I want to show these 3 images.
Sometimes, depending on conditions from a hide-when formula, I only want to show 1 and 3:
How did I do that? Pass-thru html helped me out: take a look at the form in Designer:
You’ll see some gray spots where pass-thru html spaces were added.
I edited the image a little to show it better: red spots are spaces in pass-thru html, green spots are normal spaces.
If you create the line breaks in pass-thru by selecting the last space on one line and the first space on the next line, it’s not really a line break (technically it’s just a line break in your html source). This explains the red spaces in the form.
But wait! If you select spaces and images together and make them pass-thru, nothing shows up! That’s because if you surround an imported image resource by pass-thru html, it becomes pass-thru itself, meaning that the “text” is interpreted as html, meaning that no image will appear.
By adding a “normal” space in front of the image, selecting space and image and check it as not being pass-thru html, you can fix this. That’s what the green spaces mean.
Old news? I don’t know, I know it for a while, but discovered it myself. As always, it can be something that is know by many for years… Anyway, I wonder why it doesn’t work in the Notes Client? It’s like Notes threats the multiple lines as a single line and the hide-when at work is the one from the top line…