I need to find all templates that use a defined field type.

What is the best way to do it ?


4 Answers 4


As field types are not linked with item's ID you cannot use Link Database for that.


You could iterate through all fields in PowerShell and find those with particular field type enter image description here


Open SQL Management studio Execute something like that

FROM [sc_sitecore_master].[dbo].[SharedFields]
WHERE FieldId = '{AB162CC0-DC80-4ABF-8871-998EE5D7BA32}' AND Value = 'MY FIELD NAME'


  • MY FIELD NAME is a file type name
  • why do you use FieldId and value ? Why field Id is not enough ? Commented Feb 20, 2017 at 12:21
  • 1
    {AB162CC0-DC80-4ABF-8871-998EE5D7BA32} in this case is an id of Type field (Sitecore field), notice that query is executed agains SharedFields table not Items Commented Feb 20, 2017 at 12:29

I used a variation of Balaji's answer to search for data templates that contain a particular field type (in this case "link"), rather than for content with the field type. This also pops up the results in SPE's nice data grid for printing as HTML or exporting to a spreadsheet.

Get-ChildItem -Path "/sitecore/templates" -Recurse | Where-Object {$_.Fields["{AB162CC0-DC80-4ABF-8871-998EE5D7BA32}"] -like "link"} | Show-ListView -Property FullPath, Id

If you have powershell extension, you can try

 Get-ChildItem -Path "/sitecore/content" -Recurse | Where-Object {$_.Fields["{AB162CC0-DC80-4ABF-8871-998EE5D7BA32}"] -like "Text"} 
  • 'Text' is a field type name

I ended up doing this to find templates utilizing a specific field type

$startPath = "master:/sitecore/templates/Features"
Write-Host "Search started $(Get-Date -format 'u')"

$list = [System.Collections.ArrayList]@()
$itemsToProcess = Get-ChildItem $startPath -Recurse

Write-Host "Items found: $($itemsToProcess.Count)"
if($itemsToProcess -ne $null) {
    $itemsToProcess | ForEach-Object { 
        $match = 0;

            if($_.Type -eq "General Link") {
                    $info = [PSCustomObject]@{
Write-Host "Search ended $(Get-Date -format 'u')"
Write-Host "Items found: $($list.Count)"
$list | Show-ListView

Replace $startPath with your path and replace the field type with what you need to find. In my example I was looking for a "General Link"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.