I have embedded a view on a form & I am displaying documents based on the username in that embedded view. Now if no documents are found for a username in that view, I want to display a message instead of the view. Please help me on this.
Subject: Display message on No documents in view
Hi,
- In form , where the view is embeded, create a compute field, “number_docs” to count the number of documents in the view, formula like this:
alias_view := @Subset(@ViewTitle;-1);
rem {return number of documents in current view};
number_docs_ of_view := @Elements( @Trim( @Text( @DbColumn(“”:“Nocache”;“”:";alias_view;1) ) ) )
Precision :
-
this formula is for a not categorized view, adapt it to a categorized view…
-
If you have several form for embeded view, use a shared computed field

- In hidden when formula of view put :
number_docs = 0
- Create a text in your form (where the view is embbeded):
let’s say : “Sorry, there are no document in this view !” and in hiddden when formula put :
number_docs > 0
HTH
Thierry
Subject: RE: Display message on No documents in view
Hi Thierry,
Thanks for the response.I modified as below & now I am able to get the number of documents for Categorized embedded view.
number_docs_of_view := @Elements( @Trim( @Text( @DbLookUp(“”:“Nocache”;“”:“”;alias_view;@Name([CN];@UserName);2) ) ) )
But the problem is the count of documents is getting updated only if i click on the embedded view. Onload the count is showing as 1.
Subject: RE: Display message on No documents in view
Hi ,
Oups ! use a “compute for display” field to count docs…
Regards,
Thierry