I want eliminated the message "No documents found"I saw several ideas in the forum.I did this:
Create a $$ViewTemplate with a $$ViewBody with the next condition:
@If(@Elements(@DbColumn(“”:“NoCache”;“”:“”;“ViewName”;1))=0;@True;@False)
I)I have this situation:
a)A page with htm code and embedded view , to display this I use HTMl option.
b)A $$ViewTemplate for ViewName
with a $$ViewBody field with the condition view before.
If I call my page htm with embedded view, the browser doesn´t call $$ViewTemplate ¡instead my ViewName.
I did I lot of tests , but I don´t Know what It’s wrong.
Can anybody help me?
Thanks in advance,
Sonia
Subject: No documents found
Use that same formula as a hide when formula on your HTML view on the page.
There are some other options you can use on the browser side. You can use CSS to hide the H2 element or use javascript to change the text to something more user friendly.
Subject: RE: No documents found
Create two hidden fields:1)FieldName:ViewName(text,computed for display):formula as:@Subset(@ViewTitle;1)
2)FieldName:docsFound(text,computed for display):formula as:@If(@Elements(@DbColumn(“”:“NoCache”;“”:“”;ViewName;1))=0;“False”;“True”)
Now above u r embeded view add following text with pass thro html:
No Documents To Display
and for this text hide when formula as:docsFound=“True”
For the embeded view,write hide when formula as:docsFound=“False”
Thats it.it worked fine for me.
Subject: RE: No documents found
1)The easy solution would be use a css , writting this:
h2{display:none;}
because web code cotains
No documents found
But I doesn´t work fine. Domino obviate this, and I’m sure that the page use my css.
- Viswa Ganti , I tried this solution, but It dosen´t work fine.
I’m not sure if I’m doing all steps correctly.Could you describe a little more.
3)I prefer no use javaScript to solve this.
I do really estimate your help,
thank you very much.
Sonia
Subject: RE: No documents found
All the steps I described above will be in $$ViewTemplateDeafault form.
Are you getting any error… or it is just showing default message?
Subject: RE: No documents found
Did you try the hide-when solution?
Subject: RE: No documents found
Thank very much for your help.
1)Hiding the view, in my page, with the formula,that works fine.
2)Viswa , finally using your option, I got the correct result calling the view directly, but when I call my view from my web page, I don´t no why the embedded view , doesn´t call $$ViewTemplate.
Anyway, problem solved.
Thank you very much,
Sonia