Autocomplete lotus notes field based on column in view - lotus-notes

I making a form which represents project. I'd like to make a field with autocomplete option, for example when I make new project and entering the name of the project lotus will look in existing projects (specified column in view) and suggests name. I need it to prevent creating two projects with same or similar name in user friendly form.
Thank you.

You can do that by adding field with type: Dialog List (with option Allow values not in llist) and as a possible values put
#DbColumn(""; ""; view_name; column_number)

If you want to avoid duplicate names, #dmytro's solution will actually suggest to enter existing names, what may be confusing to users.
What I would do is to lookup similar project names (anyone remembering #Soundex?) and show in computed for display field under the editable field. Only caveat: it will not refresh as user types in, and you need to refresh form to trigger the lookup.
You should also validate your form and do not allow to save it with existing project name (unless it is the same document - compare looked up UNIDS).

Related

Copy fields from FormA to a new form FormB

I am trying to simplify an existing Notes Form in an application that I am converting to XPages. The Notes Form has over 240 fields on it and a bunch of logic that I want to clean up. Plus the form has all kinds of display formatting that makes viewing it complex. So what I have been trying to write an agent that will get FormA and cycle through all the fields and copy them to FormB. I will then use FormB to bind my XPage to and trying to track down data issues will be much simpler. If the FormA didn't have so many fields I would just recreate it manually, but I'm sure with over 240 fields I would introduce some new typo errors.
You don't need to do anything with your form in order to create a XPage layout for it.
XPAges don't need a form at all, although it makes development easier, as after creating the data binding all fields from the form are available and can be dragged and dropped to the Xpage. Fields that are not on the form have to be created manually in the source code of the xpage (e.g. copy and paste an existing one and change the binding/name)
If you want to clean up your documents, an agent can do this without even touching the form.
For this task please consider the difference between a "Form" and a "Document".
A form is a design element that defines the look and feel of a document.
Forms contain fields that define what type of data you can put in your documents.
A document is a stupid "container" for items (not fields). It contains items for any field on the form that existed in the form when the document was created / last saved. PLUS items that are created any other way (e.g. Using formula or lotusscript agents) or that have been on the form in an earlier stage of development.
If you remove a field from a form, it will NOT be removed from the corresponding documents, not even by saving them. But If you add a field to a form, the document will have an item for that field after saving (forever, if you don't remove it manually using an agent).
With this knowledge you can simply create a new, "cleaner" form with the same name as the old one and rename the old one. From this time on, document will be displayed with the new Form and you can develop your XPage using it as your data source.
If you need to accumulate the data in the documents, this can be done with an agent without using a form: just manipulate the document DIRECTLY.
Here is an example in formula to put two fields together:
FIELD NewFieldName := OldField_1 : OldField_2;
FIELD OldField_1 := #DeleteField;
FIELD OldField_2 := #DeleteField;
I think, in most cases it's not a good idea to have a form with 240 fields. It looks for me like a form from old Notes 3 or 4 times when no embedded views were available and one to many relations were put into fields with index e.g. 1 to 20.
Maybe, a redesign is a better way to go.
Also, you don't need to create and maintain a form with all 240 fields for developing your XPage. Actually, you don't need the form at all. With a data source definition based on "Domino Document" you define a form name and which way you want to create a new document or find an existing document. That's it. Then you can create your fields in your XPage. Give them a name and a type. You can do this in Designer UI. Just write the new fieldname into "Bind to" for selected "Data source". Select in "Display type" a field type (String, Number, Date/Time). That is not only valid for display but will save the field as selected type to document too. In this example it will create a new field "YourNewField" and will save it as a integer number.
When you submit the page all fields will be created or set in document. You can check the fields and their types in Notes client using the document property box.
A good way though is to create the form with the most important fields. Then you can open the document in Notes client and check the fields set by XPage.

How to populate a site column from a list to another list?

I have defined a couple of lists for capturing registration details of the user. There is a list for holding personal details of the user and there is another list which holds professional details of the user.
The two lists are used over two different pages in which name and ID both are required.
How do I get the name and ID populated automatically into the professional list from personal list so as the user doesn't have to fill the similar information twice?
Is it possible without doing any coding stuff?
This little control may help you
http://cascddlistwithfilter.codeplex.com/
Basically you would link the first Cascading drop down control to your user details list and the field name. The second drop down would then filter the users ID so the user can select that.
I have used this before and it can be a pain in the backside to configure but when it's there it is so very powerful and useful.
It's not fully automated but i'm unsure how you would get any closer with a bespoke event receiver.
Create the custom form there, you have keep some text box with the refresh button, so when ever you fill the user id and press the refresh button. You need to right small logic to bring the user from the the source list.
Or you can use the personal details id as look up column in the prop list so you will get the id and select the id and do refresh. Anyway you have right the logic in your custom form code.

InfoPath won't let me customize forms for list

When i try to create a custom InfoPath form on my Orders List I get the following error:
The SharePoint list form can't be customized with InfoPath because fields of an unsupported data type are marked as required, or because fields are corrupted. In SharePoint, try deleting the columns or editing the column properties to remove the required attribute. - Product (Lookup)
Additional information:
The Site contains;
Two Site Content types Product and Order. Order does have a lookup field to product, it is a optional field so NOT required.
Two Lists. A Products list with Product as Content Type and an Orders list with Order as Content type.
The Site Collection has the SharePoint Server Enterprise Site Collection features activated. Creating custom InfoPath forms for the Products lists works without any problem.
I tried to delete my List and recreate it but it i still get the same error. Hope someone can help me with this issue.
Thanks
Apperantly this was due to to the Title field in the Content Type being a required value. Changing the lookup to the items ID solved it.
This worked for me. But if you don't want to use the ID field in your views or on the form, here are a couple tips to replace it with the Title (or other column) in your lookup field...
Replacing the IDs in the form:
In InfoPath, create a new data source for the lookup field. Follow through the prompts to find the list to lookup. Once it's added, change the Value to ID. This will now set the dropdown list in the form to display the Title values as well as properly link the IDs in the list.
Use Title (linked to item) in your list view without instead of the ID:
Create a new index in the list you're looking up for the field you want to be linked. Then go back to the main list and change the lookup back to Title (linked to item). Note that this will again break the ability to edit the form in InfoPath. Changing it back to ID will allow InfoPath editing again. Then just change it to Title (linked to item) again when done. There's probably a "right" way to do this but it works for me.
Apperantly this was due to to the Title field in the Content Type being a required value. Changing the lookup to the items ID solved it.
Simple solution to this is, create a lookup field using SharePoint List settings, and then edit the form with infopath for further design related changes. When you creates lookfield using infopath this gives above issue, i could resolve it by creating list column and then editing form with InfoPath.

Sharepoint custom list, dynamic field?

Hey guys, just wondering if their is a simple way to create an Item in a custom list but i need that item to be dynamic. The user can click add more to get another field that would hold the same type of data an unlimited amount of time.
If i could even just add an excel spreadsheet type of field that would work also. But excel wouldnt need to be a requirement on the users machine.
I thought i had read somewhere you could do this using info path but i cant seem to find anything relating to it on google.
The InfoPath feature is called a "repeating section". There is information on how to set that up in Office Online.
If you wanted to achieve this entirely in SharePoint, the problem is that there can only be a fixed number of fields in a list. So you could create as many that would ever be used and just display all of those. Or to make it much nicer for the user incorporate jQuery to hide all of the fields except the first one and provide a button for them to click that unhides the next one.
There is good information on how to access list form fields using jQuery in the question How can I set the default value in a SharePoint list field, based on the value in another field?

Sharepoint: Person column in custom list

I have a Person field in my custom list. I want to have a view that will show multiple fields from that Person instead of the one I had to choose when creating the Person column.
So basically I want to have one column for Person and then in the view see Name, title, email, phone. All of those are valid choices but I can only pick one right now.
I really want to avoid typing in the username lookup for each column I choose to display.
This is SP 2007
It sounds like you need to create a custom fieldtype (with a fieldcontrol) that inherits from the userfield but in viewmode renders out the different columns you need. Is that something along the lines you are looking for?
http://www.sharepointblogs.com/nicksevens/archive/2007/08/31/create-custom-field-types-for-sharepoint.aspx
Note: This link is broken
You probably want a Computed Field. Note that this is not a Calculated Column. A Computed Field is what is used to display the same data is different ways. In SharePoint there is a Title field, but there is also a "Title (linked to item with edit menu)" computed field as well as a "Title (linked to item)" computed field.
See midway down this link for more details. I'm not sure if it will have all of the power that you need, but if it does it is almost certainly what you are looking for if you don't mind getting into the Schema XML file a little.
Could you use a DataView web part for this? If it's just a question of viewing the data that might be suitable.
Came across this thread and thought I'd add a tip. This suggestion is clearly not for every use case, but may work well in situations where you're managing a list rather than allowing manual inputs (verified to work with SP 2013):
Create a spreadsheet with columns to match your SharePoint list that contains multiple profile fields. (for example: name, phone number, email address)
In the spreadsheet, enter the same email address in all of the person/group field types in that row. (e.g., boss#company.com, boss#company.com, boss#company.com)
Select and copy the row(s) you wish to transfer to SharePoint.
In SharePoint, change the list view to "Quick Edit" and paste the row(s) into the grid.
SharePoint will process each field and convert the email address to the profile value you selected during the list setup.

Resources