Submitted by WayneK on 2019/12/03 13:41
Is there any way to preserve the ItemCreated date when an item is copied to a different database?
 
Nothing I've tried has worked. 
 
Right now, I'm stuck having to create a new field for this date then manually copy/paste dates from the original.
 
Wayne

Comments

[quote=WayneK]
Is there any way to preserve the ItemCreated date when an item is copied to a different database? 
Nothing I've tried has worked. 
Right now, I'm stuck having to create a new field for this date then manually copy/paste dates from the original.
[/quote]
I think (if possible) the best way would be to have a field that copies the item-created date in the original file -- but should not change when Item created date changes (in the new file). That would then be used as the item created field.
Whether that's possible...(?)
I had one in my work file, but it was setup (it was Armando or Pierre gave me the instructions) to change when another user date field was changed. So probably not much point in giving the code used (goes in options in field properties).
 
But just to give you an idea -- 'MyDate' field, based on 'ItemCreated', but changes if 'Date' field changes:
<source>SELECT ¯qItemCreated.ItemID, IIf(IsNull([date]),[ItemCreated],[Date]) AS [MyDate]
FROM ¯qItemCreated LEFT JOIN ¯qDate ON ¯qItemCreated.ItemID = ¯qDate.ItemID;
</source>

Hi Wayne and Tom,
 
I'll fix it in v114q so ItemCreated is not changed when creating a copy of an item
 
w.r.t. that, what about if item created date was not locked and users could edit it... Interested ? As an option ? After a dialog box ?
 
Pierre_Admin
IQ Designer
 

Paul_J_Miller

2019/12/03 15:54

In reply to by Pierre_Admin

Copying the Item Created Date so it is the same in a copy is a good idea.
 
Making the Item Created Date editable is not such a good idea in my opinion.
 

WayneK

2019/12/03 17:54

In reply to by Pierre_Admin

Thanks for the upcoming fix. 
 
I like the additional suggestion, too.  Maybe Paul can elaborate on his objection.
 
Wayne
 

Paul_J_Miller

2019/12/04 05:42

In reply to by WayneK

[quote=WayneK]Maybe Paul can elaborate on his objection.
 
Wayne
 
[/quote]
 
The 'ItemCreated' date should represent the date the item was originally created.  If it can be edited then you can no longer rely on that being the case.
 

Pierre_Admin

2019/12/04 14:50

In reply to by Pierre_Admin

In v114q:
  1. Change: Grid: Copy / paste whole items (i.e. XML mode) keeps the same created / modified dates
  2. New: Properties pane: Item created and modified dates now have an Edit context menu. A confirmation dialog will be shown to temporarily unlock the cell
Let's see if #2 is useful...
 
Pierre_Admin
IQ Designer
 

Paul_J_Miller

2019/12/05 12:57

In reply to by Pierre_Admin

Well I won't be using option 2.  But then there are many facilities within InfoQube which I don't use, simply because I don't need them. 

Pierre_Admin

2019/12/05 13:40

In reply to by Paul_J_Miller

Hi Paul,
 
Food for thought... Future will tell, never say never... Only fools never change their mind...  
 
As for IQ facilities go, how is the new "Related Items links" working for you ? Is it as good / better than embedded [[link]] ?
 
 
Pierre_Admin
IQ Designer
 

Paul_J_Miller

2019/12/06 06:23

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Hi Paul,
 
Food for thought... Future will tell, never say never... Only fools never change their mind...  
 
As for IQ facilities go, how is the new "Related Items links" working for you ? Is it as good / better than embedded [[link]] ?
 
 
Pierre_Admin
IQ Designer
 
[/quote]
 
OK, I can't predict what will happen in the future but from my perspective at the moment I cannot envisage the circumstances where I would need to alter the created date of an item, but I will bear it in mind for future reference.
 
The 'Related Item Links' are wonderful and very useful.  Their function is related to (pun intended) but not identical to the embedded [[Link]] functionality which would also be wonderful and very useful.  Although I still have no idea how to solve the problem of having more than one item with identical names, if you create a link to [[Discombobulator]] what happens if there is more than one page called 'Discombobulator' ?
 
This is not an issue in ConnectedText as all pages must have unique names.
 
The two facilities serve slightly different purposes.
 
Yes, having 'Related Item' links has resolved many of the issues which the [[Link]] functionality would also have resolved but I feel that they are both necessary, one is not a substitute for the other.

Hello! Sorry for reviving this old thread.

I noticed that this changed a long time ago, and while it can be useful in certain cases, it's actually not convenient when you use copy-paste (XML) on a list of items (with a bunch of pre-filled fields) as a template and really don't want to preserve the original ItemCreated date. Is there an option to get the original behaviour? (The "Only copy user values" option/check box doesn't affect this; and I want to copy all values anyway, without preserving ItemCreated.)

Thanks for your help!

Hello!

So, I tried the fixed check box, and it probably does what it's supposed to do, but it's still problematic for doing what I've been doing for the last 13 years (create a template, and use the copy-paste as XML to replicate it, and have the itemcreated date set to now).

When the "only copy user value" check box is checked, all the calculated fields are empty (this is probably why I never used the option, even if by design), and trying to fill them up after a copy is quite impractical in most cases. It's also impractical to copy-paste a large template and add extra steps to change the creation date do "now", especially when you use that template multiple times a day.

So, could copying the itemcreated value be only an option for special cases (like copying items from one DB to another)?

Thanks!

Hi Armando,

No, it was not the correct implementation.

In the next version, the Paste dialog will be a checkbox to select the behaviour

Pierre_Admin

 

I see that checking the "only copy user value" checkbox now includes more fields in the XML copy-paste, but there are still calculated fields that aren't copied.

I understand that the other feature ("the Paste dialog will be a checkbox to select the behaviour") will be included in another version -- not the 117d patch.

Thanks!