View created programatically does not work as expected. Plz help

Hi,

Wish u a good day.

My problem:

My aim is to check the ProhibitDesignRefresh option of all the design elements. changing a view’s formulaclass value to 1548 will collect all the design elements.

So I created a view using lotus script.

Set vw=db.Createview(“DesignView”,“Select @ALL”)

Set col_vw=vw.CreateColumn(“Title”,“$title”)

This works but the column is not sorted.

I tried Issorted property but no result.

I also tried copycolumn method.

Set col_vw=vw.CopyColumn(vw1.Columns(0),1)

It copies and have the sort symbol in the column also.

But while viewing only the database documents are shown but not the expected design documents.

when the view is viewed in the lotus designer the design documents are visible.

its is little not understandable.

Could anyone help me toknow what the problem happening?

Thanks for ur help.

Subject: View created programatically does not work as expected. Plz help.

Hi Bala,

I have worked on this and its working perfectly. Please specify column formula as well. I have specified $title in that and it is working like a charm.

Best Regards,

Munish Kaushik

Subject: RE: View created programatically does not work as expected. Plz help.

But I want to create the view with the Title column in a button click. My problem is, column created, but not sorted.

Subject: RE: View created programatically does not work as expected. Plz help.

Can you create a template view with all the sort settings that you need and use that template to create the new view?If no template is specified, it will default to the default database view.

db.CreateView( viewname , viewSelectionFormula , templateView )