How to get SharePoint workflow status for each SP element using PowerShell script?

The workflow state data that I want is in a column with the same name as the document library. However, I cannot access the data in this column with the name for this column displayed in SharePoint. I need the name of the inner column if I am going to access this column using the code below.

$list = $SPWeb.lists["document library name here"] $items = $list.Items $count = 0 foreach($item in $items) { # (typically you put the column name you want where SPWorkflowStatusColumnName is) if($item["SPWorkflowStatusColumnName"] -eq "Completed") { $count = $count + 1 } } 
0
powershell sharepoint sharepoint-2010
source share
1 answer

The internal name of a column is a space of eight characters and non-alphanumeric characters.

or to find the internal column name, just click the column name in the list and check the url value after SortField = is the internal column name.

eg. in my case, usrl looks like this: http: // [server] / [sitecollection] / [site] /listname/Forms/AllItems.aspx?View= {see GUID} & SortField = TradingS & SortDir = Asc

and my internal field name is "TradingS".

0
source share

All Articles