Xpages control for displaying multi-value field in table form - xpages

I have a location form that has a field called Employees that is multi-value (obviously contains list of employees.
In the Location XPages I want to display the list of employees in a table form like so
FirstLast1 FirstLast2 FirstLast3
FirstLast4 FirstLast5 FirstLast6
FirstLast7 FirstLast8 etc.
I have looked at a DataTable, Repeat, etc. but nothing seems to work right. I could use a computed field with HTML but that seems like too much work.
Any suggestions would be greatly appreciated.

Related

Lotus Notes - Why is my view data missing?

I recently just constructed a new view for a Lotus Notes Application and tested it to be fine.
It was supposed to get field data from 2 nearly identical forms and display into the view. The fields on both forms share the same name.
The formula used in View Selection is
SELECT ContactName; CompanyName; ContactNumber; CarNo; RequestDate
--comment: These are the names used in both forms --
This worked fine yesterday. Also I made sure that each column has selected the correct field to display and I did not change any settings. However, today when I went back to check, the view is all empty.
What seems to be the cause of this?
Your selection formula for the view is not correct. You use the name of the forms in the select statement and then add your fields as column in the view. If we assume that the forms are called FormA and FormB, then your selection formula for the view can look like this:
SELECT Form="FormA":"FormB"

How to add two related forms in a notes view?

Ok,I have a situation where I need to display a view that contains field value from two forms which is connected via a "CVNo" field. At first I thought it was simple and dived in. I added the form names in the view selection formula of the notes view and then created columns and assigned their respective values, but what happened was the output I got from doing so is a very jumbled and cluttered view. Based on my understanding the notes view displayed the column values from each form differently. I don't know how to do this or if this possible in notes view. All help and suggestions and are very appreciated.
In Lotus Notes view you cannot display documents connected to each other by a custom field. The only connection which can be displayed in Lotus Notes view is parent->response document hierarchy.
And please note that you do not create view that displays values from forms. You create view to display field values from documents, which are filtered to be shown in this view.
If you have documents, with field Form, one Form1 and another Form2, then create a view with selection formula:
SELECT Form = "Form1" | Form = "Form2"
Every row in the view represents a document (either with Form1 or Form2 value in the Form field).
And every column may contain a field name or #-formula to evaluate with every shown document to display a value in this column.

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.

XPages newbie - view columns in discussion database

I'm a traditional domino developer just beginning XPages. I'm working on modifying the standard 8.5.3 Domino discussion database. I've added some fields on the Main Topic and response forms, one called category. I've added a categorised column in the ($xpAllDocuments) view to the left of "Topic" for the category field. This works fine in Notes as you'd expect, but when the view is rendered in the All Documents xpage, the category twiste displays without any label. I'm not sure how to modify the column data for the xpage, as it seems to use a repeat? instead of a view?
Any help greatly appreciated, and apologies for the presumably basic enquiry!
You have to add the categories column to custom control allDocumentsView which renders the view for browser.
How to find out where to set the new categorized column? A good way is to look at the "All properties" of a certain element. For that, open the Source pane of custom control allDocumentsView, position cursor on <xe:dataView and look at "All Properties". If you hover over the properties' labels you get a helper window with a short explanation.
In your case, property categoryColumn is what you are looking for. Assuming you added a categorized column Categories to view ($xpAllDocuments) then you would have to put into property categoryColumn:
With that, your source code gets expanded by
<xe:this.categoryColumn>
<xe:viewCategoryColumn
columnName="Categories"
columnTitle="Categories">
</xe:viewCategoryColumn>
</xe:this.categoryColumn>
and you will see the added categorized column in your rendered XPage.
I don't know the discussion template in detail, but when the All Documents Xpage is using a repeat control, then you cannot expect an automatic category expand/collapse feature as in a Notes view.
If you want that, you need a View control on the Xpage.

Save Infopath form w. dynamicly created fields in Sharepoint 2010 Library

I am very new to Infopath, and need some architechtual guideslines. My scenario is as follows:
I have a Sharepoint list, let's say it contains beer, and three items of it: "Kronenbourg", "Corona", "Tuborg". "Beer" is a content type, derived from Item.
What I need to do :
I need to create a "dynamic" Infopath form, that presents the user with a CheckBox for each beer. If a new beer is added to the Beer list, a new Checkbox should show up on the form without intervention, even on saved instances of the form. I have not decided what should happen upon deletions.
I then need to save this infopath form, including the selections, in a sharepoint form library, so that the users can go back to one of maybe many beer-forms that they have saved, and maybe change the selections.
I also need to build a string from the selections at some point in time, and present this string in a visible column in the form library, but thats beyond the scope of this post.
What I managed to throw together so far:
I have a kind of working Infopath form. I have added a sharepoint dataconnection to the Beer list, and dragged a repeating table to the design area. This "works", i get a list of my list items. I then added dummy Y/N field to my beer content type, selected it in the fields, and now i get a neat checkbox next to my records.
Obviously this does not seem right. I do not need to save anything back to the Beer table, I only need to use the beer table for lookup, and keep the selected choices in the saved instance of the form.
Ok, thanks for staying with me so far. What do I do here, can Infopath be persuaded to support a scenario like this, or am I better off building custom webparts? I think my main questions are:
Can I maybe attach an "input-only" CheckBox to a repeating list/section ? (and how do I refer to such dynamically created control)
How do I make Infopath load the choices dynamicly from db, but save the data in the instance of the form?
Should, and can I maybe attach a content type to the form library, representing the choices and somehow attach that to the form?
Thanks for any input
If I understand your requirements, I think the thing to do here is to use a Multi-Selection list box (MSLB). This can have its values populated from a secondary data source (i.e. a list), and it would be bound to a repeating field that would automatically have values added and removed as values are selected and deselected.
As far as getting the selections into a single string, if you just want this value for a column of the form library that the forms will be submitted to, you can just use this repeating field as a promoted property, and use the "Aggregate" option to combine the values into one.
The other option would be to create a separate field to hold the string and use the "double eval trick" (please Google that) to combine the values into one. One gotcha here is that if you use double eval trick with a MSLB, you have to put the formula both in a rule on the MSLB's field, and in the default value formula for the target field.

Resources