Sharepoint, Create View, Filter Properties - sharepoint

I'd like to create a view in Sharepoint that has a filter based on a date field.
The filter should be >= Today and <- Today + 90 days.
I found a reference to the
<Today OffsetDays=”5” />
CAML function and could probably use this by setting the view using the API.
My question is how do i set this using the browser based admin page?
alt text http://www.isuppli.com/Img/Development/CreateViewSample.gif

This can be done OTB using the filter dropdowns when modifying or creating a view:
Filter Image
alt text http://img91.imageshack.us/my.php?image=filterew5.png
Edit: Fixed image

Ok... when you using formula for the column...
It cant using [Today] because it doesnt exsist on the list column...]
So i suggest that you must required the column Today first, so you can use [Today] At the formula..
i think u just dont have using CAML or column formula, but it can do from filtering like AdamBT says...
Hehehe...

Related

Unable to merge the cell with LINQ and UiPath

I am unable to find the solution for merging the cell by LINQ and as well in UiPath.
For your reference I'm attaching the screen shot.
I have this,
I want this,
Just need the solution in LINQ or UiPath.
You need to use groupby method in LinQ.
In your case it will be like this:
(someDT.AsEnumerable.
GroupBy(Function (row) row.Field(Of String)("SN")).
Select(Function (grp) grp.CopyToDataTable)
).ToList
After it you will recieve a list of datatables grouped by SN Field, and you'll be able to work with them as with separated datatables using for each.

Sharepoint Date and difference

In my list i have created calculated field to get the difference between the last modified date and today's date.
I use the formula
=datedif([modified],[today],"d")
It is throwing an error : The formula contains reference(s) to field(s).
Please advise.
I do not have a separate column to hold today's date.
Regretfully, you cannot use [Today] for calculated fields. Calculated fields only update when an item is modified, so the Today Trick of creating a column named Today, setting your calculated field, then deleting that column, is a bad move.
You have a couple options, the best of which is probably to use JavaScript within a Content Editor Web Part on the page to do the calculation for you. You could also try using SharePoint designer and custom XPath and xslt to get "days since modified" to appear on your page.
Generally, if you want something to identify items that haven't been modified in a while, it should be done with filter library views: they can use [Today], and they don't require tricks or workarounds.

SharePoint Web Parts can not be connected via hyperlink fields

In short:
I'm trying to filter an XSLTListViewWebPart based on what is selected in another XSLTListViewWebPart. Using a String field as connection this is working fine. Using a hyperlink field no data is displayed.
In more detail:
I have two lists, say Accounts and Projects. Both have a hyperlink field accountURL.
All accounts have different accountURLs. Different projects can have the same value for accountURL. Both are displayed on a page using the XSLTListViewWebPart.
The simple goal is to filter the Projects list based on which item is selected in the Accounts list using the accountURL field. So I established a web part connection using the acountURL as a filter. Alas, when an item in the Accounts list is selected no items are showwn in the Projects list although I double checked that there are matching values.
When using a string field instead of a hyperlink field for accountURL everything works like a charm. Problem is, I need the hyperlink field.
Is this desired behaviour? Do you have any suggestions for a workaround?
(I already tried converting the hyperlink field to a string field via a calculated column which did not work out either.)
All was and is to be done in the web interface or SP-Designer. Coding a WSP is not an option for this problem. As I'm not quite familiar with the correct terminus technicus I use field and column interchangeably.
All help is greatly appreciated.
Ben
Someone on the Microsoft forum suggested the following workaround which does its job well:
Add a hidden text column to both lists.
Use a workflow which is triggered on item creation and update to copy the value of the hyperlink column to the hidden text column.
Connect both webparts using the hidden column as filter.
Nonetheless, I still wonder whether it is possible to use hyperlink columns or other special columns for filtering. I also had the problem that I cannot use a person column as lookup.
Does anyone know if whether there ist some kind of overview
which column types can be used for filtering/formulas/lookup/...?
Cheers,
Ben

How to format a SharePoint ListItemProperty Date Field

I've got a SharePoint (2010) list with a date field on it.
Now in my custom display form I can go ahead and add the field
<SharePoint:ListItemProperty Property="MyDateField" runat="server" id="ListItemProperty1" />
which results in the following output
21.02.2011 15:44
How can I tell SharePoint to format the Date to
21.02.2011
The only way so far seems to be to create a new calculated column based on that date field and do the formatting within the field definition, but that kind of seems to be the wrong way.
Any help would be much appreciated.
When you create the "Date" column in the list, there is option to select: 1)Date only ; 2)Date and time.
If you select the first option, then in the display form, only the date is shown
I had a similar task to perform recently, but the client wanted the time stored as well as date, just not to display the date.
The way I got around this was to create a Calculated Column which displayed the date in the format required, and I then just pointed my field control to display that column.
The calculated column had this formula:
=TEXT([News Article Date],"dd MMMM yyyy")
FYI: this was in a page layout.
Please see http://panvega.wordpress.com/2008/12/08/ddwrtformatdate-with-different-formatflags/ for custom pages.
programmatically (powershell):
$web = get-spweb http://thingy/
$list = $web.lists["List Name"]
$datefield = $list.fields["Date Field"]
$datefield.displayformat = [microsoft.sharepoint.spdatetimefieldformattype]::dateonly
$datefield.update()

How to customize Dispform.aspx in Sharepoint List

Good Morning,
I have a SharePoint site that I've been trying to fix up for awhile. I haven't had problems adding fields into the NewForm.aspx and EditForm.aspx, but Dispform.aspx seems like a whole different problem.
I've been using SharePoint Designer, and it looks as if all the other fields are displayed using this:
<xsl:value-of select="#Priority"/>
But when I go ahead and follow the same format to try to insert a new field, it continues to pull up empty values when I'm positive something should be there.
SHORT: How can I add fields to display on DispForm.aspx?
Any help would be GREATLY appreciated, I'm so stuck!
Thanks,
E
SOLUTION:
I had forgotten to add my new columns under the Content Type of the List I was using. Thanks for the help!
Your approach is okey, couple of things to check:
1) Each Data View Web Part has the DataFields tag, it looks like this:
<DataFields>#URL,URL;#Comments,Notes;#Color,Color;#Image,Image;</DataFields>
and it contains the names of your fields. Make sure your new field is displayed in this list.
2) Also there is difference between internal field name and field name. In the example above Comments is internal name but name is Notes. So to display Notes field correctly you should use:
<xsl:value-of select="#Comments"/>
3) Make sure you are trying to output this value in the right place of XSLT template. The easiest way to find the place is to look for existing fields and just add the new one along these.
Hope it helps...

Resources