#SetViewInfo with Sorted Columns - lotus-notes

Can someone advise whether #SetViewInfo can be used with click to sort columnns.
When a view is filtered using #SetViewInfo it removes the column sorting options, thus removing the functionality of the view. Even when resetting to all records the column sorting option is not available, however I have overcome this by opening a second view then opening the original view, messy but it works. I am using View Action Buttons. (Not sure how to store the value in a Check Box Action).
Filtering
#SetViewInfo([SetViewFilter]; "userinitials"; "$80"; 1)
Resetting.
#SetViewInfo([SetViewFilter];"";"$80";1);
#SetTargetFrame("frame");
#Command([OpenView]; "DummyView"); //Needed to get the click to sort back
#Command([OpenView]; "OriginalView")
Also if the view is already sorted on another column, ie not in a categorised state no records are found. I don't want to have to remove the sorting options on my views. The help implies you don't need to have the view categorised. But I cannot get it to work if I don't, ie if I use 0 on an uncategorised view nothing happens.
From Help
isCategory - Number. Boolean value. Required in a Standard Outline view; not for use in Calendar views. 1 indicates that the column in the columnName value is a category. 0 indicates that it is not.
Is the #SetViewInfo limited as I have found or am I missing something?
Any help appreciated.

Yes, #SetViewInfo has limitations. As far as I know, you cannot keep the sorting when you use SetViewFilter. I also believe you need to have the view categorized, at least in older versions of Notes this was the case, if I remember correctly.
Limitations like this is why I personally don't use #SetViewInfo very often (if at all), I try to use other ways to display filtered documents.
One way I have handled it in the past is to use a special form with a rich text field, and then I build a list of filtered documents (e.g. through a search) and render the list of documents in the rich text item.
I use this technique to do that: http://blog.texasswede.com/dynamic-tables-in-classic-notes/

Related

Are there any negative consequences of giving ‘Title’ field a default value of ‘View’ and making it a hidden field?

When I create a list, I have gotten into the habit of doing the following:
Change Title field name to Item
Give it the default value of View
Go to Advanced Settings
Allow management of content types > Yes
Click Save
Then in Settings, click on the Item type
Then click on the Item field and select Hidden
Then go back to Advanced Settings
Allow management of content types > No
Click Save
The result of this is that:
The Title field (now called Item) is hidden in the form
I have a column called Item, which has the link View in each row (which opens up the item)
I can’t remember why I started doing this (possibly one of the reasons outlined in this video), but the use case must have demanded it and I just kept doing it.
However, lately I have been having troubling thoughts about whether it negatively effects indexing or has any other undesired outcomes.
For example, I did a search in a list the other today, and in the drop down search results that were displayed, I just got multiple rows of the value View.
I also read just before posting this question that list items in the recycle bin will be identified by the value that was in the Title column. So if they all say View it will be impossible to differentiate one from the other.
So I just thought I would see if there is any authoritative, definitive best practice around the Title column, and ask if my convention is bad and if so what I should replace it with.
Thank You.
(Edit: I also hide the Title column in document libraries, as it doesn’t seem to serve a purpose, as clicking on the value in the Name column opens up the document anyway - therefore the ‘link’ action of the Title field is not required).

Xpages Repeat Controls Tabular display

I have a situation wherein I need to display all documents in view. Issue is I need to display multivalued fields (can be achieved by modifying view column to display new line). Now issue comes when a column value is also multivalued. E.g. first column is created by looping through 50 fields (single value) and second column is created by looping through corresponding 50 fields but these fields are multivalued.
I am looking for ideas about how to nest repeats in this case. Issue is in first repeat I get the handle of documents but in nested one i am not able to get this handle to be able to loop through fields. And it is not simply one column or value I want to display, there are 4-5 such columns.
Any ideas are welcome.
Thanks in advance.
You want to start looking at a repeat control, not a view control. Have the outermost control loop through the entries in the view and populate the data source of a containing panel with a Notes document. Then inside the panel you only refer to the inner document data source.

Getting Value Picker and HughesConnect Viewpicker combination in XPages

I have an application that uses the Ext Lib value picker from a view and it works but it is very cludgy. The reason is that there are over a thousand choices and the user has to scroll through them all to get to where he/she wants to go. I want to use the HughesConnect.com picklist CC, which is very nice. However, I am having trouble with a particular issue that is probably very simple but I can't figure it out.
I want to be able to use the HughesConnect.com picklist CC to grab one value at a time and put it into a field. Then, when the user clicks on the button again, I just want them to have the ability to grab a value and append it to the same field. Every time I run it now, it is just overwriting the field. I can't use Multi Value in the CC because the view has multi values in the column from the same document. I have found that if this is the case, it doesn't work. No matter what I try. I am not very good with arrays in XPages, so I am likely doing something wrong and to be honest, I don't even have any sample code because everything I have tried hasn't worked.
I am starting to wonder whether it's even possible but it sounds so simple that it must be.
The Value Picker allows you to add a search with a view data source. Is there a reason for not using that? I can't remember if search support multi-select. It may not.
If you want to use Mark's view picker, how about getting a bit creative. Push the value into a Hidden Input field that has an onChange event. In the onChange event, append the value to a different multi-value field. If you bind the Dojo List Text Box to your multi-value field, it will make it easier for users to deselect entries. It's a bit creative, but should produce exactly the result you're looking for.

How to specify the width of site column in a list?

I have developed a list in SharePoint. While entering new item in it, like name, if I keep on typing it gets spread over a line making the width of cloumn spread over page. I want to limit the width of site column so as the column's value spreads over multiple lines instead of spreading over one. How can I do this setting?
This is not a setting you can configure in SharePoint. You will need to write some custom code using css and possibly javascript that will set the width of the column. You can make a change like this in SharePoint Designer.
You must use min-width (CSS) in your block.
You have to create custom XSLT for this. There you have loop all the column and need to specify the overflow:auto, hidden,.. CSS property. So it automatically get effect based on your internal name of the field.
So whereever you have the field it automatically get affected. If it for one single view you can use JavaScript to achieve this but this is not right way to do.
The data you are entering can be displayed in many ways. Today in a table format, tomorrow in a dropdown etc. You should distinguish between:
limiting the amount of data that can be entered in a site column (can be done in SharePoint alone, when you design your list)
limiting the wrapping of the words in a table cell today or trimming the values in a dropdown tomorrow (can be done using HTML/CSS "nowrap" if you display the list values in a browser app, or differently if you show the values in a WinForms app)

how to hide the grand total row in views using #formula or lotusscript

I want to hide the grand total row in views using #formula or lotusscript.
How should I do this?
There's no Formula or LotusScript for hiding the grand total in a view, but I found a work-around for the cases where the grand total does not make business sense at all and would only confuse the users.
Displaying the view as an embedded view in a form, using Show single category leaves out the grand total row. You may need to use this view only as embedded view and have otherwise useless fixed category for all documents (i.e. put "1" in the formula for the categorized column and use the same in Show single category). You'll also need the SaveOptions text field with default value "0" so the users don't get dialog asking whether they want to save the document (after all, for them this is a view) and the line Continue = False in the QuerySave event.
Then you need to find how to best integrate this with the other views - maybe use Auto frame in the form properties if your application uses framesets. The users may not be able to tell the difference.
Seems like a lot of work for removing one line from the view but I am not aware of another way to hide it and sometimes it's worth the added complexity.
Does that help?
You can also create a Filtered By Category view by using #SetViewInfo with first column with value "1" and filter by this values. All documents will be displayed only total sum will be hidden.

Resources