Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Search for placeholders
vlada
Hello,
Does anyone have some sample how to search for all assets where asset type is "Placeholder" using MediaBin web services?
I use next code:
MBMetadata mdAssetType = new MBMetadata();
mdAssetType.mName = "Asset Type";
mdAssetType.mID = "{4510D310-E6BB-11D2-BF95-00A024DB7160}";
mdAssetType.IsMultipleValue =true;
mdAssetType.mValues = new object[1];
mdAssetType.mValues[0] = "Placeholder"; //"Placeholder";
constraints[0] = new MBSearchConstraint();
constraints[0].mMetadata = mdAssetType;
constraints[0].mSearchOperator = "Equality";
Unfortunately above code always return error: Invalid value
Any suggestion?
Thanks in advance,
Vladimir
Find more posts tagged with
Comments
lyman
Asset Type is respresnted in MediaBin as an enumerated list. In other words an integer. The Placeholder type is number 22.
Note that the older asset types form a contiguous series that are hard-coded in one place. The newer approach for types introduced more recently is to register a type number along with the new DLL, so some of the newer types will have much higher numbers. The safest bet would be to query an asset of known type (or export one as XML and read the number out of the file).
Cheers,
Lyman Hurd