Is there a way to calculate a date field based on aother date field in sharepoint list?

In a SharePoint list, I have a 'Start of Use Date' and need to ensure the 'Review Date' is no more than 14 months after the 'Start of Use Date', but can't figure out the formula.  Can you help?

You can cast the field values in the SPListItem to DateTime objects and call the AddMonths(int) function to see if the two are more than 14 months apart. For instance:
DateTime startOfUseDate = (DateTime) item["Start of Use Date"];
DateTime reviewDate = (DateTime) item["Review Date"];
if (startOfUseDate.AddMonths(14) >= reviewDate)
// Review Date IS NOT more than 14 months after Start of Use Date
else
// Review Date IS more than 14 months after Start of Use Date
Danny Jessee
MCPD - SharePoint Developer 2010
MCTS - SharePoint 2010, Configuring
dannyjessee.com/blog

Similar Messages

  • Is there a way to use SPD workflow to enhance the alert function in a SharePoint list?

    I have a request to achieve this:
    the Alert function in a list only allows a user to get alert when anything changes or created, but there is no way to specify notification before a certain field date.  For Example,   users want to be able to choose to receive a reminder
    10 days before expiry date.
    The requirement:
    1) A user can set a reminder if they wish  - so cannot be systematic automatic reminder
    2) A user can choose how many days before expiry to receive reminder
    I tried workflow by adding additional columns to set the user name to receive reminder and # of days before expiry day to send reminder.  But that setting can only apply to one user at time, and the user has to set one item at time, e.g. if user A sets
    5 days prior for the reminder on an item. then user B changed it to 4 days, then user A's setting if overwritten.
    So this is really a customization of the alert function, but wonder if it can be achieved by workflow created in SPD (or NinTex?)
    Thanks in Advance for any tips!

    One option i can think of is, you can set the Create and Edit access: in Advanced Setting from List setting to Create items and edit items that were created by the user, so that other users can't override the items created by other
    users.
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • I have 2 apple id's with different apps and data saved under each.  It's very annoying so now I want to create a new id with my primary email address I use now.  If I do that is there any way to transfer all my saved apps and app data like game saves etc?

    I have 2 apple id's with different apps and data saved under each.  It's very annoying so now I want to create a new id with my primary email address I use now.  If I do that is there any way to transfer all my saved apps and app data like game saves etc so I don't lose all of that information and can easily switch to a singular apple id?

    Apple does not transfer content bought with one Apple ID to another Apple ID. Apple will not merge two Apple IDs.
    If most of your content was bought with the Yahoo! Apple ID but you now want the Gmail address for your Apple ID, the trick will be to change the address used for the Yahoo ID with the Gmail address. However, to do that you must first free the Gmail address from that other Apple ID. Use the instructions from Apple to substitute another address that is not used as an Apple ID for your Gmail address in the Apple ID with the Gmail address. Then, when the Gmail address is no longer used in an Apple ID, you can use the same instructions to substitute the Gmail address for the Yahoo address in the Apple ID with the Yahoo address.
    Changing the email address you use for your Apple ID -
    http://support.apple.com/kb/HT5621

  • Is there a way to Insert Data into a Lookup Column Type on a SharePoint List Destination in SSIS?

    Greetings.
    I have successfully worked out inserting SQL data (2008 R2) into my 2010 SharePoint list (New, Update, Delete) by creating an SSIS Data Flow Task as outlined here:
    http://fsugeiger.blogspot.com/2010/01/synchronise-sql-table-with-sharepoint.html
    However, the problem I am running into is inserting data into the SharePoint Columns that are "Lookup" column types. I verified that all of the values I am copying from SQL into the SharePoint lookup column exist in the customn list it is pointing to. It
    is important to have this column be a lookup column as it links to another custom list that has many more columns of related information.
    I have read and re-read the SharePoint SSIS Adapters 2011.docx from
    http://sqlsrvintegrationsrv.codeplex.com/ and the only section that seems to apply is this:
    "Looking Up Values in a SharePoint List
    If you have to look up a value in a SharePoint list, you can use the Lookup transformation in your data flow, and use the SharePoint List source to load the lookup table. You may have to add a Derived Column transformation or a Script component that splits
    data in the lookup column on the ";#" delimiter to separate the ID value from the description.
    If you are replacing values in your data with the values that you look up in the list, then loading the changed data back into SharePoint, you only have to include the ID from the lookup column. SharePoint ignores the description if you include it."
    I am not sure if the above statement means that I should be passing the assocaited ID's other than the actual data into the SharePoint List destination. If that is the case, that will not really work as the lookup contains hundreds of rows. Not too mention
    I have several of these lookup column types pointing to several different lists.
    Any guidance in how I can put data into a SharePoint Lookup column type via Data Flow Task would be so much appreaciated.
    Thank you.
    My errors are:
    Error: 0x0 at Data Flow Task, SharePoint List Destination: Error on row ID="1": 0x1 - Unspecified error, such as too many items being updated at once (batch), or an invalid core field value.
    Error: 0xC0047062 at Data Flow Task, SharePoint List Destination [1903]: Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.PipelineProcessException: Errors detected in this component - see SSIS Errors at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.ProcessInput(Int32
    inputID, PipelineBuffer buffer) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
    Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "SharePoint List Destination" (1903) failed with error code 0x80131500 while processing input "Component Input" (1912). The identified
    component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will

    I have found a solution to my problem and thought I would share it here in case there are others who are struggling with the above scenario. If you have a better way, I would love to hear about it since my way is a bit tedious.
    In a nutshell, in order to have an SSIS package put data from an OLE DB Source into a SharePoint List Destination Lookup Column, you need to pass the ID of the value that is being looked up, not the value that is in the “master” OLE DB source.
    Rough explanation, OLE DB Source value for column “Approp” is “4005” --> SQL matches “4005” with the ID in the new lookup table (“4005” = ID “5” as defined in the SharePoint lookup list) --> “5” gets passed into SharePoint List destination lookup
    column --> SharePoint displays “4005” and successfully links to the lookup list.
    Funny thing (not really), the error(s) outlined in my original post are not related in getting data into a SharePoint Lookup column as I am now successful in getting data into the system but I am still getting the same above error(s). I think it has to do
    with the ID column in the SharePoint list destination. What I can’t seem to figure out is why since I am not linking any data to that ID column (at least on new records). I am however linking it on Update and Delete and the errors mentioned above disappear
    and things work well.
    There are three tasks that need to get done in order to get data from SQL into a SharePoint lookup column assuming you have already set up your SharePoint lookup lists:
    1. Create new lookup table(s) in SQL that has the IDs from the SharePoint Lookup list and the values coming from the “master” OLD DB Source. You can see the ID column in SharePoint by toggling it on in a view.
    2. Create a SQL command that JOINs all the databases and tables so that the ID is passed and not the value into the SharePoint lookup column
    3. Change the “Data access mode” to “SQL Command” instead of the “Table or view” in the OLE DB Source and paste your command into the “SQL command text:” area.
    Other helpful info is that you may also need to add additional columns in the new lookup tables in SQL for the scenarios when the data is not unique. You can see this two times in my SQL command example for Units and JobTitles:
    SELECT
    pps.SSNm,
    pps.file_updated,
    pps.Employee_id,
    /* pps.CheckDistNm,*/
    Check_Distribution_id = COALESCE( d.ID, 0 ),
    pps.Job_nbr,
    pps.SeqNm,
    pps.action_eff_dt,
    Fund_id = COALESCE( f.id, 0 ),
    Appropriation_id = COALESCE( ap.id, 0 ),
    ActionCode_id = COALESCE( ac.id, 0 ),
    SpecNumber_id = COALESCE( jt.ID, 0 ),
    pps.Employee_id,
    /* pps.Fund,
    pps.Approp,
    pps.Unit,*/
    Unit_id = COALESCE( u.ID, 0 ),
    PosNm,
    PosCode,
    pps.LastName,
    pps.FirstName,
    pps.MI
    FROM
    x_PPS.aReportVw.pps_screens_active AS pps
    LEFT OUTER JOIN dbo.DistributionNumbers AS d ON
    pps.CheckDistNm = d.Check_Distribution
    LEFT OUTER JOIN dbo.Units AS u ON
    pps.Fund = u.Fund AND
    pps.Approp = u.Approp AND
    pps.Unit = u.Unit
    LEFT OUTER JOIN dbo.Appropriations AS ap ON
    pps.Approp = ap.Approp
    LEFT OUTER JOIN dbo.Funds AS f ON
    pps.Fund = f.Fund
    LEFT OUTER JOIN dbo.ActionCodes AS ac ON
    pps.ActionCode = ac.ActionCode
    LEFT OUTER JOIN dbo.JobTitles AS jt ON
    pps.SpecNm = jt.SpecNumber AND
    pps.JurisClass = jt.JurisClass

  • I have a external back-up that my iMac (10.6.8) won't mount. Is there a way to mount without intializing and losing back-up data?

    I have a external back-up that my iMac (10.6.8) won't mount. Is there a way to mount without intializing and losing back-up data? I used time machine to back-up to a Seagate Go-flex hard drive. I get a message from my iMac that says it doesn't recognize this drive and wants to initialize. Hope someone can help.

    Try connecting the drive to a Windows machine, then ejecting.  If it won't eject properly, restart the Windows machine, and try again.  Then try connecting it to the Mac.

  • Is there any way to calculate tax in sap at document level

    Is there any way to calculate tax at document level & Round the tax amount at document level, i m giving below the details of the scenario
    item A = 110 Rs
    Item B = 150 Rs
    Tax is not calculated on individual rows it is calculated on document total i.e = 260 Rs @ 4 % = 10.4 & then this amount needs to be rounded i.e = 10 Rs is there any procedure to map it in SAP if u want any additional information revert back to me

    Hi
    Tax for Whole Document only is not possible, u have to include a tax per Row.
    U can setup automatic tax by setting the setup here - Admin- setup-financ- tax- taxcode determination..
    Rounding is posibble- for this u have to setup in Admin- setup-financ-currencies - rounding..
    Also Admin - system intialiisation - document setting- rouding by document or by currency.
    Giri

  • I no longer have iTunes that is synced to my iPhone and now I need to update my iPhone with iTunes. Is there a way I can do this without losing all my data?

    I no longer have the iTunes that is synced to my iPhone and now I need to update my iPhone with iTunes. Is there a way I can do this without losing all my data? Can I access my iTunes that is on my stolen laptop, so that I don't lose my info and photos etc? Please help!

    Hi Michela27,
    Thanks for visiting Apple Support Communities.
    If you have content on your iPhone that isn't on your computer, the best thing is to use the advice in this article to transfer it to your new computer before setting up sync:
    iTunes: Transferring media from your iPhone, iPad, iPod touch, or iPod
    http://support.apple.com/kb/HT1209
    Cheers,
    Jeremy

  • Ok, so while we all wait for ever, is there a way to revert back to the previous os and data?

    Ok, so while we all wait for ever, is there a way to revert back to the previous os and data?  I could wait a week for this mess to get worked out and I need my telephone. problem is I'm stuck in the loop too.  will not connect and there I have a brick.  sort of a shoot yourself in the foot process if you have a wiped phone previous to updating it.  useless
    anyone know how to revert?  Verizon btw, had 4.2.10, tried for ios 5, tried for the gold, no win
    Thx

    I'm seriously thinking of downgrading back to Mavericks for one very specific reason - the Mail app. As a long-time Mail user, I've always had the Address Panel open down the left side of the Mail app, selected from the Window/Address Panel menu item. It showed a simple list of all contacts, or groups, and only the email address(es) associated with each one. Could select a group then click BCC or TO: or whatever.  Could also select multiple addresses and pop them into the CC: list or wherever you liked. And within a Group (eg Work) could do multiple select, and also choose which email address to use for those who have more than one (eg work vs personal).
    But - Apple seems to have removed it in Yosemite. The Mail app has NO WAY - at least that I can find - to access a simple list of contacts and email addresses from within the Mail app. What an absolutely stupid move, unless it's just me being dense and can't find it!
    If anyone can point me to where or how to show that Address Panel in the Mail app, I'd be most grateful. Having Contacts app open all the time just doesn't cut it either, apart from not enough screen real estate. Contacts won't show you a simple list of people and email addresses like the Address Panel in Mail did. It shows you the full details, one at a time, for each contact. Which is absolutely NO good if I have to send out emails to 50 work colleagues, for example.
    Why does Apple DO stuff like this? Like removing the sidebar in iTunes, for another example?
    If I can't find an Address Panel for Mail, I'm going back to Mavericks.  Anyone got any clues?

  • Is there a way to download/export the 6,634 pages of data of spool

    Hi,
    We are running a job in the background which generated an output of 6,634 pages in a spool.  We are having problem downloading the data on Excel since it only allow me to download about 200 pages at a time.  Is there a way to download/export the 6,634 pages of data all at one time? ;

    Try fm RSPO_RETURN_ABAP_SPOOLJOB.and download as TXT file with coma delimited .
    But if you are try to download 6064 pages to excel and excel have limitation of 65000 lines ,

  • Is there any way to search for a term using the Firefox search field, and have the results automatically open in a new tab?

    Is there any way to search for a term using the Firefox search field, and have the results automatically open in a new tab? When there was support for Google Toolbar, I was able to do this; now, whenever I want to search for something, I have to open a new tab to do it, and cut-and-paste my search into the search field in the new tab. I used to be able to highlight, drag, and drop something into the search field and have it automatically open in a new tab. This is enough for me to switch to Chrome . . .

    Set a preference to have searches from the Search Bar (upper right) automatically open all searches in a new tab
    #type '''about:config''' in the URL/Location/Address bar and press the Enter key
    #if you see a warning, accept it (promise to be careful)
    #Filter = '''browser.search.openintab'''
    #in the lower panel, double click the item (or right-click and choose "Toggle") to change the value to "true"
    #close the about:config tab and test
    #See:
    #*For help with opening/using about:config, also see: http://kb.mozillazine.org/About:config
    #*Also see: http://kb.mozillazine.org/About:config_entries (click on "Browser", scroll down to browser.search.openintab)
    '''Search Bar''': http://support.mozilla.com/en-US/kb/Search+bar
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    About Google toolbar............
    Google decided that they will no longer produce the Google Toolbar for Firefox 5 and newer version. It is best to move on to other alternatives than to try any "hacks" to the toolbar that may or may not perform in the future. Future versions of Google toolbar will only work with IE7-9. Google Toolbar is not available on any other browser, even Google's own browser.
    *http://googletoolbarhelp.blogspot.com/2011/07/update-on-google-toolbar-for-firefox.html
    *https://support.mozilla.com/en-US/kb/google-toolbar-not-compatible-firefox?s=google+toolbar&r=0&as=s
    *http://www.google.com/support/toolbar/bin/answer.py?answer=1342452&topic=15356%29
    *Google Toolbar 8 FAQ (IE only): https://www.google.com/support/toolbar/bin/answer.py?hl=en&answer=1111588
    '''''To access your Google Bookmarks visit''''' www.google.com/bookmarks.
    Alternatives:
    *http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
    *https://addons.mozilla.org/en-US/firefox/addon/googlebar-lite/
    *https://addons.mozilla.org/en-US/firefox/addon/gbookmarks-google-bookmarks-fo/

  • After deleting an email address from Contacts is there any way of preventing it from popping up in the To: field of Mail when one starts to type in a contact name.

    After deleting an email address from Contacts is there any way of preventing it from popping up in the To: field of Mail when one starts to type in a contact name?

    if you are not on ios 6, then all you can do is wait.  if you have deleted the address from your contact list, then it will live on for a while in your 'recently used' addresses.  as you use new addresses, those older ones fall down the list, and eventually fall off altogether  (unless you use them again).  Have patience, it will go away.
    Or do the update....

  • Is there any way to get an ipod to display only complete albums in the albums list?

    is there any way to get an ipod to display only complete albums in the albums list (rather than every album represented by every song on the ipod)?

    Sounds like there is some discrepancies in the tagging in iTunes.  See this page for more information.
    Grouping Tracks Into Albums
    B-rock

  • Running data providers based on other data provider results in webi

    Hi,
    Thank you all; this is a great place to look for answers whenever you stumble in BO.
    I got a specific requirement for a Webi report. The report should display the associated metrics only when the total surveyed members are greater than 25, if not, N/A.
    This requirement happens to be a new add on for the already existing report; the report was built with multiple providers, in which one of the providers gives the total surveyed members.
    Is there any way that we can control the rest of the data providers based on the first data provider output. I donu2019t want to run the rest of the data providersu2014 as there are too many, and each takes quite a bit of timeu2014 if the surveyed members are less than or equal to 25.
    We are on XI3.1 Sp3
    Thanks in advance.

    Thanks for the quick response!
    Vills u2013 Is it query from the results functionality that you are talking about? I tried this approach, but as I am using the measure in the filter of the 2nd data provider (total members > 25),and the resulting SQL is not getting parsed.
    Waveryu2014 The report filter that I tried to use is not working. Can you please give me some more details how to use it?
    As I would like to leverage the existing report, which perfectly works for the total members> 25 logic, I was asked to find a way to not to run the rest of the data providers to save db resources, provided if the total mbrs participated in the survey from the first data provider <25.
    Is there any way that we can embed some case statement in the other data providers to make them run or throw an error message depending on member count?
    To give some more understanding, I want to provide you the screen shots of the queries, but I am unable to paste those screen shots here .
    Essentially I am looking for is there any way to use one data provideru2019s output as a trigger for the rest of the data providers?

  • How to enable/disable the input fields based on the data entered/user action in the web dynpro abap?

    How to enable/disable the input fields based on the data entered in the web dynpro application abap?  If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.

    Hi,
    Try this code.
    First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
    Next go to Init method.
    Set the readonly value as 'X'.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
         DATA ls_context TYPE wd_this->element_context.
         DATA lv_visible TYPE wd_this->element_context-visible.
    *   get element via lead selection
         lo_el_context = wd_context->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_context IS INITIAL.
         ENDIF.
    *   @TODO fill attribute
    *   lv_visible = 1.
    *   set single attribute
         lo_el_context->set_attribute(
           name =  `READONLY`
           value = 'X').
    After that Go to the Action  ENTER.
    First read the input field ( first input field, which is value entered field) , next give a condition
    if input value is not initial  then set the readonly value is '  '.
    DATA lo_nd_input TYPE REF TO if_wd_context_node.
         DATA lo_el_input TYPE REF TO if_wd_context_element.
         DATA ls_input TYPE wd_this->element_input.
         DATA lv_vbeln TYPE wd_this->element_input-vbeln.
    *   navigate from <CONTEXT> to <INPUT> via lead selection
         lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    *   @TODO handle non existant child
    *   IF lo_nd_input IS INITIAL.
    *   ENDIF.
    *   get element via lead selection
         lo_el_input = lo_nd_input->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_input IS INITIAL.
         ENDIF.
    *   get single attribute
         lo_el_input->get_attribute(
           EXPORTING
             name =  `VBELN`
           IMPORTING
             value = lv_vbeln ).
    if lv_vbeln IS not INITIAL.
        DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_visible TYPE wd_this->element_context-visible.
    *  get element via lead selection
        lo_el_context = wd_context->get_element( ).
    *  @TODO handle not set lead selection
        IF lo_el_context IS INITIAL.
        ENDIF.
    *  @TODO fill attribute
    *  lv_visible = 1.
    *  set single attribute
        lo_el_context->set_attribute(
          name =  `READONLY`
          value = ' ' ).

  • Auto population of data to fields based on other input field.

    In overview screen, I have one input field "Business Partner" which contain search help.  As soon as business partner selected from dropdown, the other input fields like Name, Address, City, state should automatically populated without hit of 'ENTER' key.
    I verified with method DO_PREPARE_OUTPUT, but it is triggering only by hitting ENTER key. Is there any event or method which will trigger after business partner selected from dropdown? or any other option to achieve to auto populate the fields.
    Please find attached screen.
    Thanks in advance.

    Hi Narayana,
    You can use the get p method for setting up the values without pressing the enter.
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
        WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
          rv_value = 'AI_SELECT'.( you can give here the event name)
        WHEN OTHERS.
      ENDCASE.
    Define event with the same name above( AI_SELECT),
    You can set the value of fields based on the first field value within this event.
    Thanks,
    Dharmakasi.

Maybe you are looking for

  • Problems with conference calls(adding and merging calls) after upgrade to ios 8.1.2 on iphone 5s

    I am having weird problem intermittently with adding calls or merging them or swapping them. The issue happens 8 out of 10 times whenever I try to do a conference call. This issue came up after I upgraded to 8,1.2. Never experienced this in 8.1.1 or

  • Java 5 update breaks Lightzone program

    I have just installed the new Java Update 5 for 10.6 and found that it stops Lightcrafts Lightzone 3.9 program from starting. This program is a great photo editor which depends on Java and I have had to restore OS X back to what it was before this Ja

  • Home hub 3 Wifi

    Hi. I have my second homehub 3 as my previous one kept on rebooting. This one doesn't reboot, however, almost every day I get a spell where the wifi signal drops, my devices all lose the connection and start moving onto "Wifi with fon" and then the w

  • Airport Express 6.3

    I am running Maverics on my Mini, is there a way to install mountain lion OS X on an external hard drive connected to my Mini? I need to do this so I can admin my airport express 6.3

  • Acrobat crashes when scanning

    I downloaded the trial version of acrobat because I need to create a lot of documents for my teaching portfolio But when I try to create a pdf from the scanner using File/create pdf/from scanner the app crashes I have not been able to get it to work