According to the change log, support for $FIELD expression was added in PWPS_DAB version 2.1.18.0
using the following powershell code:
$AuditUser = 'thbn' $SearchField = "`$FIELD(10)`$ = (SELECT DISTINCT o_userno FROM dms_user WHERE o_username in ('$AuditUser'))" $AuditSkabelon = 'Innovationsprojekter\Test_THBN\' $SearchFolder = 'Større anlæg\7x\' Get-PWRichProjects -FolderPath $AuditSkabelon -JustOne | Add-PWSavedSearch -SearchName 'CAD-files' -Environment 'Dokument' -DocumentName $SearchField -SearchFolder $SearchFolder -SearchSubFolders -UpdatedAfter 10/10-2020 -ReplaceExisting -Verbose
Gives the following in the search builder: ='$FIELD(10)$ = (SELECT DISTINCT o_userno FROM dms_user WHERE o_username in ('thbn'))' however, this was the expected search result: $FIELD(10)$ = (SELECT DISTINCT o_userno FROM dms_user WHERE o_username in ('thbn'))
Do we have any examples for writing the $FIELD expression ?