Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tony Kiernan 278 posts 341 karma points
    Sep 25, 2012 @ 17:17
    Tony Kiernan
    0

    Using SQL or C# (or something) statements for date defaults

    It would be really useful if I could use some sort fo standard syntax to define a default value on date fields.  For example T-SQL like DATEADD(HH, 4, GETDATE()).

    I am running regular imports, and although I have been working with unpublish dates mostly supplied, my client assumed that if a record was no longer in the import, it would no longer be on the site. A fair assumption (if wrong on many levels).  Being able to set the unpublish date for a few hours ahead, just beyond the next import, would mean that if the record was not in the next import it would get unpublished shortly after.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Sep 25, 2012 @ 22:35
    Richard Soeteman
    0

    Hi Tony,

    The delete record when not in datasource feature is on the list of things to implement for V3. The only thing that worries me about this feature is when people are uploading an old datasource or the wrong datasource all records are removed from the site. I don't want to get the blame for that. But it's coming. I think setting the unpublish date is also full of risk. What happens when teh scheduler doesn't run? Then all content is removed.

    But it's possible to do this.If you use the RecoredImported event you can set the value of unpublish date. I wrote a blogpost how to use this event a while back http://www.richardsoeteman.net/2011/04/29/AssignATemplateBasedOnDatasourceValueInCMSImport.aspx Maybe you can use it?

    Hope this helps you for now.

  • Tony Kiernan 278 posts 341 karma points
    Sep 26, 2012 @ 10:50
    Tony Kiernan
    0

    I'll have a look at the blog post, thanks

    If the scheduler doesn't run, the user can always log in and republish the node in question.  Not ideal, but then, neither isthe scheduler not running

  • Tony Kiernan 278 posts 341 karma points
    Sep 26, 2012 @ 10:59
    Tony Kiernan
    0

    >>The only thing that worries me about this feature is when people are uploading an old datasource or the wrong datasource all records are removed from the site.

    Perhaps 'Unpublish' instread of delete?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Sep 26, 2012 @ 14:59
    Richard Soeteman
    0

    Ah that's a good one. For members still an issue but for Content I can give 2 options, Unpublish or Delete. Like that :) Thanks

Please Sign in or register to post replies

Write your reply to:

Draft