Submitted by reesd on 2010/11/03 11:24
Can you put an auto-assign rule on ItemCreated? I tried the following auto-assignment rule on ItemCreated. This didn’t seem to do anything. I suspect because ItemCreated is special and auto-assignment rules do not fire for it.
AM:ItemDate=ItemCreated

PS, I wasn’t able to add a row equation to ItemCreated (Row Equation box will not allow me to type in it). Perhaps the auto-assign box should be disabled also?

Thanks,
d
 

Comments

I suspect that ItemCreated is one of those SQL request field not containing any real data, so it doesn't trigger any  event. However, you could add the auto-assign equation to all fields which are commonly use as source, since most items are created to be displayed in a grid.
 
Something like
 
A:ItemDate = IIF(isnull(ItemDate), itemcreated, ItemDate) 
 
This will prevent the ItemDate to be overwritten when it's already been written. However you might not want that. In this case, simply, as you put it:
 
A:ItemDate = itemcreated
 
You could make it an AM: also if you prefer. That way you could "touch" any selected item's "source field" to have the itemdate field populated with the itemcreated data.
 
 [Edit : this solution wouldn't always work if only TLIs have the "source field" assigned to them... There are ways around this but I won't go further for now as others like Pierre might have even better insights into the whole thing. Ideally, even "empty" fields like Itemcreated would trigger events.]

This is correct, currently, SQL generated fields (some system fields and those you create yourself using the <source> tag in the field Options) don't trigger events and can't have equations.
  1. They cannot have equations because, they are themselves equations (from the SQL)
  2. In theory, they could trigger events, but since they are SQL generated, IQ cannot monitor these.
 

reesd

2010/11/11 08:42

In reply to by Pierre_Admin

Thanks Pierre, I think it would be a good idea to more visibly disable the equation text boxes for those fields so users don't add equations that will never be run. I've added a mantis issue on it -  http://mantis.sqlnotes.net/view.php?id=1068.
 
d