3

I have a product library which contains choice menu column. The name of the column is New Product?. And the choices are TRUE and FALSE.

I want to create a custom view which only shows Old Products. I'm able to create the view by filtering but I need additional setting. Let say if I create a new product today and the product becomes old product after 15 days. So the product automatically can be viewed in the Old Product view. I'm unable to create filter with date format.

I'm prohibited to use designer or any back end queries. Please assist.

All View enter image description here

Old Products View enter image description here

Old Product Filter Option enter image description here

  • are you changing New Product value to False once product becomes 15 days old? – Gaurravs Dec 30 '15 at 7:44
  • If I change then I'll be able to view as old product.. Is there any way we can do it as automatically? – Yuges Dec 30 '15 at 7:45
  • so here you got 2 options, create custom code, for instance timer job, which will run daily and update the New Product value to False once product becomes 15 days old. And your view will do the work for you. – Gaurravs Dec 30 '15 at 7:48
  • Gaurravs.. how we can create the custom code as you mentioned? – Yuges Dec 30 '15 at 7:57
  • Read article How to create time job msdn.microsoft.com/en-us/library/office/… – Gaurravs Dec 30 '15 at 8:45
3

create a Calculated column, called 'NewProductExpiry', with a formula that amounts to '[Created] + 15 '. Then use the Calculated column in your View's filter.

For View "Old Products" you can add filter to NewProductExpiry column as is grater than or equal to [Today]

Hope this help !

2

We can also create “New Product?” as “Calculated” type, then use the if function into the formula to set the value of the “New Product” automatically.

Here are the steps:

  1. Create a column named “Today”. The type doesn’t matter here, just click “OK”.

  2. Create “New Product?” as “Calculated” type, and add the following formula in the formula area:

    =IF(DATE(YEAR(Created),MONTH(Created),DAY(Created)+15)>=DATE(YEAR(Today),MONTH(Today),DAY(Today)),"TRUE","FALSE")
    
  3. Delete the “Today” column to make SharePoint get the default [Today] current date. If you need to edit formula, you need create “Today” column again, then edit formula.

For more details about use [Today] in calculated column, you should refer Use of [Today] and [Me] in Calculated Column

  1. After 15 days, “New Product” column will be changed “False” automatically. You still can use “New Product? is equals to False” to filter the list.
  • How “New Product” will change to 'False' Automatically? It is not calculated column as per your solution – Gaurravs Dec 30 '15 at 9:28
  • you got any reference or link for such example? I never seen changing value of 'X' column using 'Y' column which is calculated – Gaurravs Dec 30 '15 at 9:56
  • I didn't noticed, It means you are suggesting to either change the bool column to calculate and use it in filter or create a new calculated column and use it in filter. – Gaurravs Dec 30 '15 at 10:07
  • We also know since 2008 that this Today hack does not work; workarounds: sharepoint.stackexchange.com/questions/151144/… – Danny '365CSI' Engelman Jan 1 '16 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.