Sitecore Powershell Workflow State Name -


how retrieve name of workflow state content item, not workflow state id (guid)?

get-childitem -path ("master:\content") -recurse ` | select-object -first 10 -property itempath, name, "templatename", "version", @{label="updated";expression={$_.__updated}}, @{label="workflow state"; expression={$_._state}}, `  @{label="published"; expression={$_.__publish}} 

i have see many examples of how workflow state id, need human-readable name of workflow state particular item.

you need workflow state name passing item id retrieved. because workflow in raw values stored id. why id of workflow state returned.

using below script, return name of workflow state

get-childitem -path ("master:\content") -recurse ` | select-object -first 10 -property itempath, name, "templatename", "version", @{label="updated";expression={$_.__updated}}, @{label="workflow state"; expression={(get-item master: -id $_."__workflow state").name}}, `  @{label="published"; expression={$_.__publish}} 

note have tested on sitecore v8.2 name of workflow state __workflow state. may need update accordingly script, using of _state


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -