Hi,
First time posting to the forums.
So far we have had some great wins leveraging the pwps_dab module for our purposes. We are currently working on another script to inventory out various FlatSets within data sources but are having trouble finding one of the flags visible within Explorer.
For our purpose we need to understand if a document version held within a flat set is expected to change or is 'locked'.
While we can tell if a version has changed from the one referenced in the set it doesn't tell us if its possible to change in the future when we are running our checks.
Is there an indicator for this returned by the objects via Get-PWDocumentFlatSetMembers or is there some other cmdlet that can tell us this?
Thanks.
Dean
Something like the following will show you all of the information about the set members. The o_flags is what you are concerned with. The value will be 2 if the member is locked to a version.
$pwSets = Get-PWDocumentFlatSet -InputFolders (Show-PWFolderBrowserDialog) $SQLStatement = "SELECT * FROM dms_setm WHERE o_setno IN (SELECT o_setno FROM dms_set WHERE o_sdocguid = '$($pwSets[0].DocumentGUID)')" $setMembers = Select-PWSQL -SQLSelectStatement $SQLStatement
Answer Verified By: Dean Knapper
Thanks for this Brian,
Looks to give us exactly what we needed and a lot more efficient than looping through each flat set and members like our previous attempt.
Will have to look into what other features we can get via PWSQL as so far we haven't explored it.
Cheers,
Reach out if you need some assistance (powerwisescripting@gmail.com). I do consulting. ;)