Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is there any way to query unpublised content by property value.
E.g. I want to find an unpublised node where the value of a custom property 'code' == 'abc1234'
Thanks
Hi James,
Welcome to Our!
Yes there is, you will need to use the Content Service. Here is an example:
var cs = ApplicationContext.Services.ContentService; var myCollection = cs.GetRootContent().FirstOrDefault().Descendants().Where(x => x.GetValue<string>("code") == "abc1234");
This is assuming only one root node and filtering all descendants of that node.
Jeavon
Thanks, I've got the idea now.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Query unpublished nodes by property value
Is there any way to query unpublised content by property value.
E.g. I want to find an unpublised node where the value of a custom property 'code' == 'abc1234'
Thanks
Hi James,
Welcome to Our!
Yes there is, you will need to use the Content Service. Here is an example:
This is assuming only one root node and filtering all descendants of that node.
Jeavon
Thanks, I've got the idea now.
is working on a reply...