Use list filter value when adding new items to list - sharepoint

In a webpart page I got a list that is filtered on a value given from another webpart.
When adding an item to that list (from this webpart page); is there a way to preset the column the list is filtered on to be the same as the filter value?
Thanks.
Ivar

this link describes how to pre-fill field based on a query string variable. It can be useful for you, and if you add some modification to this solution your problem should be solved. The thing is that when you come to the part where you create the parameter for the "New item form" web part, you'll not specify to be a query string parameter. Instead it should be of type "None", and after that when you make the connections between the webparts you'll connect them in a way that they pass parameters to each other, not filters. I had some similar problem recently and made it work out in this way.

Related

sorting list of items with specific field on sales order item sublist NetSuite

I like to sort the list of items in the dropdown in the standard NetSuite sublist item. Let's say items are sorted with the name when clicked on >> to open the dropdown list.
Is this possible to sort this list with any other fields, maybe a custom field on items record. let's say I add a custom field on the item record (every item), which is some numbers.
displaying that list with the order by that field.
I have seen a way around to create a custom sublist of my own requirement and then hide the standard and show the custom on a specific record by customizing the form.
I had a similar issue once, I did the following:
You can create a new body field or sublist field based on your business using userevent script(before load).
Create a search with the required order(you can do any operation to prepare your data) after that you filled the result manually to the new custom field.
Whenever the user selects a value in the custom field you set the original one to be the same as the custom one. For this one, you will need a client script.
Note: you can show your custom field and hide or disable the original field only not the whole list since the client script will be responsible to set the value to it. using this approach will not require you to add or edit any of your records which will be helpful if you have a complex process and a lot of dependencies. This approach worked for my issue I hope to be helpful to you too.

Joining sharepoint 2007 lists in a web view based on a common key field

So - I'm making a data view that is to contain a list. This list has a field that will be used to match up against two other lists. If there is an entry for this value, it should show the value from the other list, otherwise show a link to add a new one.
So, what I need to do is make a data source consisting of the rows from list 1, and fill in the Ticket field with a value from the Tickets table matching the ID value from list 1. The same should be done for the Change Type field.
Can anyone point me in the right direction to accomplish this? I've found a few tutorials, but they seem to be for showing all the data together and not match up on any specific columns for linkage.
Thank you
What you are aiming at is not available in SharePoint out of the box.
There are two approaches you can look at:
Create your own custom lookup field template for single/multiple field
selection with some sort of field
editor. Create your own controls and
program the associated code behind
logic.
Use some existing custom solutions. One such sample is on codeplex:
SharePoint Filtered Lookup Field

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 list based on another SharePoint list

I have a list in SharePoint that contains several fields. I need to do some calculations on this list (filter and count) and display the results on a different page. We are currently using SharePoint 2007.
I can't get what I need by creating a view from the list. I need to create a new list based on the first list to get the proper level of filtering.
The result I am trying to get from this view needs to be displayed on a separate page.
Since you edited with "I need to create a new list based off the first list to get the proper level of filtering" I would suggest writing a console app with some CAML to query exactly what you need and then dump that into a new list.
However, it sounds like you could be using some calculated columns and then do what Moo suggested.
I think some more details about the question would help you get a better answer.
In the list settings, you can add filters and counts/totals/sums to the view.

Auto number column in SharePoint list

In a SharePoint list I want an auto number column that as I add to the list gets incremented. How best can I go about this?
Sharepoint Lists automatically have an column with "ID" which auto increments. You simply need to select this column from the "modify view" screen to view it.
You can't add a new unique auto-generated ID to a SharePoint list, but there already is one there! If you edit the "All Items" view you will see a list of columns that do not have the display option checked.
There are quite a few of these columns that exist but that are never displayed, like "Created By" and "Created". These fields are used within SharePoint, but they are not displayed by default so as not to clutter up the display. You can't edit these fields, but you can display them to the user. if you check the "Display" box beside the ID field you will get a unique and auto-generated ID field displayed in your list.
Check out: Unique ID in SharePoint list
If you want to control the formatting of the unique identifier you can create your own <FieldType> in SharePoint. MSDN also has a visual How-To. This basically means that you're creating a custom column.
WSS defines the Counter field type (which is what the ID column above is using). I've never had the need to re-use this or extend it, but it should be possible.
A solution might exist without creating a custom <FieldType>. For example: if you wanted unique IDs like CUST1, CUST2, ... it might be possible to create a Calculated column and use the value of the ID column in you formula (="CUST" & [ID]). I haven't tried this, but this should work :)
I had this issue with a custom list and while it's not possible to use the auto-generated ID column to create a calculated column, it is possible to use a workflow to do the heavy lifting.
I created a new workflow variable of type Number and set it to be the value of the ID column in the current item. Then it's simply a matter of calculating the custom column value and setting it - in my case I just needed the numbering to begin at 100,000.
it's in there by default. It's the id field.
If you want something beyond the ID column that's there in all lists, you're probably going to have to resort to an Event Receiver on the list that "calculates" what the value of your unique identified should be or using a custom field type that has the required logic embedded in this. Unfortunately, both of these options will require writing and deploying custom code to the server and deploying assemblies to the GAC, which can be frowned upon in environments where you don't have complete control over the servers.
If you don't need the unique identifier to show up immediately, you could probably generate it via a workflow (either with SharePoint Designer or a custom WF workflow built in Visual Studio).
Unfortunately, calculated columns, which seem like an obvious solution, won't work for this purpose because the ID is not yet assigned when the calculation is attempted. If you go in after the fact and edit the item, the calculation may achieve what you want, but on initial creation of a new item it will not be calculated correctly.
As stated, all objects in sharepoint contain some sort of unique identifier (often an integer based counter for list items, and GUIDs for lists).
That said, there is also a feature available at http://www.codeplex.com/features called "Unique Column Policy", designed to add an other column with a unique value. A complete writeup is available at http://scothillier.spaces.live.com/blog/cns!8F5DEA8AEA9E6FBB!293.entry
So I am not sure I can really think of why you would actually need a "site collection unique" id, so maybe you can comment and let us know what is actually trying to be accomplished here...
Either way, all items have a UniqueID property that is a GUID if you really need it: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.uniqueid.aspx
Peetha has the best idea, I've done the same with a custom list in our SP site. Using a workflow to auto increment is the best way, and it is not that difficult. Check this website out: http://splittingshares.wordpress.com/2008/04/11/auto-increment-a-number-in-a-new-list-item/
I give much appreciation to the person who posted that solution, it is very cool!!

Resources