Skip to main content
4 events
when toggle format what by license comment
Jul 5, 2019 at 14:03 comment added Marek Musielak So you take some item ($item) and then you iterate after ListManagerTask and all its descendants and in every loop you assign ID of that descendant to the same field. So after your loop is done, it will be the last descendant assigned to $item[$templateField.DisplayName] field, right? Btw, don't use DisplayName here, use Name or ID.
Jul 5, 2019 at 13:59 comment added Gokilavani R I'm trying something like this. $item.Editing.BeginEdit() $allItems = Get-ChildItem -Path '/sitecore/content/ListManagerTask' -Recurse foreach($droplinkItem in $allItems){ $item[$templateField.DisplayName] = $droplinkItem.ID; } $item.Editing.EndEdit() | Out-Null
Jul 5, 2019 at 13:57 comment added Gokilavani R If i want to add a datasource which has more items then, should i need to add give value for sort. Or please tell me how to add list of items to a droplink field.
Jul 5, 2019 at 11:12 history answered Marek Musielak CC BY-SA 4.0