I thought I'd answered this by email, so just be sure...
You can only really do this in 7.3.x of LDSD and to do it, you need to use calculations rather than Value Type in the prrocess design.
I have an issue with this (v7.4), in what I thought was just a simple calculation doesn't seem to be working. Turning trace logging on isn't picking up anything either.
In the Request Management module, I have a new starter process, for new staff. There is a "Start Date" attribute for when the new staff member is starting. This parent request generates various other child requests, and so I wish to pass the "Start Date" attribute to the child requests as this is essentially when a request needs to be completed by.
My calculation looks like this (and it does have appropriate spacing, although it may not show here):
static def GetAttributeValue(Request):
Value = Request.Parents.Parent._UserStartDate
I assume I have overlooked something simple here, but for the life of me I can't see what. Perhaps it is still too early in the year to be at work...
P.S. As an aside, why is it that date/time fields can't have Value Types set like other attributes? I see there is already an ER for this - http://community.landesk.com/support/ideas/2356
You're correct that you should be able to get past the Value Type limitation via a calculation. I see you've already found the ER to rectify this
Your calculation is failing because it is trying to directly call the parent, but "Parents" is a collection so you need to always imagine there could be multiple items. You can't use Parents.Latest() in this case but this simple loop will do what you need:
Parent = null for ParentLink in Request.Parents: Parent = ParentLink.Parent if Parent == null: return null else: return Parent._UserStartDate
Thanks for this Stu - works like a charm.
I'm rubbish at BOO! I don't suppose you have the whole code, I can replace the attribute to match what I have.
The example above is the whole calculation (minus the two lines you always get at the top). In your case you'd just need to replace _UserStartDate with the name of your DateTime attribute.
Hope that helps.
I must have had an extra space somewhere as I was getting a couple of syntax errors. Just retried it and it seems to be happy. Many thanks for your fast response.