How to enable & disable view's back & next button

Hi,I have one embedded view , in which i use back & next button(using @DBCommand), now i want if i m viewing first set of data then back should be disabled( very much like in lotus forum), because my user always confused.

plz give ur valuable suggestions…

Rishi

Subject: How to enable & disable view’s back & next button

I dont think, domino provided any default option for the same. You can have it using Query_String (Look for Start=), and hide when formula.

Subject: RE: How to enable & disable view’s back & next button

Dear Johny ,

plz clear ur point i donot understand ur tip.

thnx & regards

 Rishi

Subject: RE: How to enable & disable view’s back & next button

Rishi,

I think Johny is saying you need to program your form so the back and forward links are hidden at the desired moments. Hide the links based on the values of the ‘Start’, ‘Count’, ‘Hits’ and ‘TotalHits’ fields/flags (eg. if the starting doc (‘Start’) is 1, don’t display the back button, if the starting doc (‘Start’) + ‘Count’ is greater than ‘Hits’ or ‘TotalHits’, hide the forward button).

Paul.

Subject: RE: How to enable & disable view’s back & next button

How can i count the documents ?

Subject: RE: How to enable & disable view’s back & next button

Refer to ‘Customizing search forms’ in the Designer Help.

The relevant fields are called ‘Hits’ and ‘TotalHits’. You need to use the Start and Count flags - for example, Query=corolla&Start=16&Count=15 to display the second page of 15 results.

Paul.

Subject: RE: How to enable & disable view’s back & next button

Dear Paul,

  If i get value for count & start , then what will be the if condition , bcoz i never disable & enable any button in lotus notes.

Rishi

Subject: RE: How to enable & disable view’s back & next button

Thanks Paul.

Rishi, I hope you are using a $$ViewTemplate form. For that form, you can have Query_String CGI field. For your previous button, have a hide formla. Formula should be hiding the button when the Query_String field contains the word “&Start=”.

When you open a view’s first page, you dont be having the “&Start=” in the url. Next page onwards you will be having something like ?OpenView&Start=101

Did i answer your query on Previous button?