I have 2 multilist field in sitecore template. below is value of source property for field1 and field2 and I'm getting list of items to select right side.


field2[this particular item does not have data folder in ancestor]:
query:./ancestor-or-self::*[@@templateid = '{8B0F4199-34F2-4A77-8905-6C5560D77A10}']//*[@@templateid = '{9819B385-1250-48CC-8D2A-C8B60C745E1B}']

is there anyway I can use one filed instead of 2 and can get all list of items combined from both source in this multilist field and available to select right side.

Thanks in advance for all your support.


You can achive the same by combining both the queries with "|" operator. In your case, the final query should be

query:/sitecore/content/x/y/website/Data//*[@@templateid='{E24AA906-8ED0-45E7-88C9-4499B0B6E22E}']|./ancestor-or-self::*[@@templateid = '{8B0F4199-34F2-4A77-8905-6C5560D77A10}']

This is a tested query and works fine. Let me know, if you face any issue.

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