I have a little bit of confusion regarding the Multilist Field in Sitecore. Basically, I want to get all of the selected MultiList Field in PowerShell to do stuff with them.
Is it possible to make those values in array?
Here is the code so far:
$props = @{
Title = "Get All Media Items by Tag"
Description = "Get all Media items by Tag"
OkButtonName = "Run Report"
CancelButtonName = "Cancel"
Parameters = @(
@{ Name = "TagName"; Title = "Tag Name"; Editor = "multilist"; Source = "/sitecore/system/Settings/Buckets/TagRepository/2021/12/16/14/36" }
@{ Title = "Note"; Value = "Select Tags you need for the Images from the Tag Repository"; Editor = "info" }
)
}
$result = Read-Variable @props
if($result -ne "ok") {
Close-Window
Exit
}
The path for the Tag Repositoy is bucket, as you know. How to get also path for that?
Source = "/sitecore/system/Settings/Buckets/TagRepository/2021/12/16/14/36" }
And this is the picture showing what this code does:
Is there any way to get those selected values and make them in array, or they are in array by default?
I personally think maybe $TagName.Values
would do the trick, or something like that