Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sitecore-query]

For questions related to the syntax of and issues with Sitecore Query notation

1
vote
1answer
20 views

Using part of an item name as query filter

So, I'm trying to work my way to what is essentially a great aunt/uncle of the context item and then looking to its descendents for specific item types. So there's a folder and within that folder ...
2
votes
1answer
28 views

Any way to filter a treelist with just the source property of the template field?

I have a treelist that I'm pointing at a folder for items, which works fine, but when I attach some kind of filtering clause, like /*[@@tid='{ID}'] it just defaults to the root of the sitecore content ...
2
votes
1answer
44 views

Multiple queries for a droplink - removing duplicates

So, I have multiple organizations content on my site, they are all grouped into a regional content area, and I also have a global content area. One of my templates looks into a folder that has a ...
0
votes
1answer
25 views

set relative query to datasource

Each Article uses datasource underneath. I'm using query to find CTA button of current item but it returns nothing. query:.//Article Datasource/Article Top Content .
2
votes
2answers
44 views

Sxa tokens not taken into account in code query

I am working on a custom field which is based on :https://marketplace.sitecore.net/en/Modules/A/Advance_Image_Field.aspx I am trying to make it suitable for SXA by changing the way to find thumbnails....
1
vote
1answer
27 views

Multilist pick subcategory based on the category selection

I have a Categories Item and Each category has Sub categories - Category 1 - Sub Category 1 - Sub Category 1 - Sub Category 1 - Category 2 - Sub Category 2 - Sub ...
0
votes
0answers
36 views

xpath query as souce for image or file field

I continue to get a Value Cannot Be Null error when clicking on Open File or Browse for a File/Image field I'm trying to point to a specific folder. Here's the problem. The folder is in a part of ...
8
votes
1answer
295 views

What are the limitations of Fast query?

After reviewing this question and answer you can see that the use of Fast query is the leading cause of migraines. (<- unverified claim) What are limitations a developer should take into account ...
0
votes
0answers
14 views

Sitecore AD configuration of component 1.3 without domain name Login

I have integrated with Active Directory 1.3 and Login is happening perfectly fine with with the username as domain\username and password. My requirement is to just sign in without with domain. For ...
0
votes
0answers
54 views

Sitecore JSS Error - Cannot read property 'datasource' of undefined at GraphQLIntegratedDemo

I create Sample Sitecore JSS React application and all pages are working fine except GraphQL. When I run GraphQL link, I am getting below error On Reload the page I am getting error I run below ...
1
vote
0answers
39 views

Multilist with Search to return descendant items

I am working on Multisite Sitecore instance and For "multilist with search" field I am trying to return all descendant items under folder item from a specific template using these queries ...
0
votes
2answers
77 views

Getting all items using a Specific Sublayout using Sitecore Powershell Extensions

I have to get data of rendering parameters used by a specific sub-layout. Is there a way to get all items which are using a particular Sublayout. Example: I have a Sublayout "SiteHeader" and it has a ...
1
vote
1answer
48 views

Multilist with search not loading for non admin

Data on the left side of the multi-list is not loading if the user is a non-admin. I have multisite on a single node so on the data source I've put Sitecore query as StartSearchLocation=query:./...
1
vote
1answer
105 views

Sitecore keywords in the metadata

Lets say we have 4 renderings on the Page and each rendering has a data source attached to it which has a Keyword field that is being used for SEO purpose. Is it possible to get all the attached ...
1
vote
1answer
140 views

Treelist to show the all the items in which have the items derived from templates mentioned in IncludeTemplatesForSelection parameter

I want to achieve the Treelist in such a way that it shows up all the ancestors of an item which is derived from the template mentioned in the IncludeTemplatesForSelection parameter of the query. ...
0
votes
1answer
60 views

Where is the value “Item owner: sitecore\smith” from “Quick Info” living in back-end SQL tables?

I'm unable yet to locate a particular "Item owner: sitecore\smith" value I see well-and-alive in Content Editor "Quick Info" of an item, but not in the SQL Server backend tables. I often pull a ...
0
votes
1answer
201 views

using sitecore queries to search for items whose names contain a specific string

I'm using this line of code to search for items whose names are exactly the string i provide in the query: string query = path + "//*[@@templatename = 'Template Folder' and @@name='" + year + "']"; ...
0
votes
1answer
164 views

How to sort items in a query inside a variant?

I need to sort items returning from a query inside a variant. For example query:.//*[@@templatename='Template']. I need to sort these items since it doesn't work through build query. Any ideas?
3
votes
1answer
247 views

Source Query using the current language version

I have a source query over a standard Multi-List field and I want the query to retrieve items based on the current selected language. Is there any attribute that could handle that in the source query?...
1
vote
1answer
135 views

Get the list of languages of an item in a droplist field query source [closed]

As a source for a DropList, I would like to use a query that returns the list of languages defined for a specific item. Is it possible?
1
vote
1answer
296 views

Fieldsource query for droptree field

Is it possible to use query for Droptree field in Sitecore 8.1? In a multisite solution, I would like to point Droptree field source to an item in that particular site. Is this possible?
2
votes
2answers
417 views

Results are not coming in the order using sortorder from lucene index

I have some items present in an item folder and want them to retrieve from Lucence index. There is a requirement that we have to order items in the Sitecore based on the order set on the Sitecore CMS, ...
1
vote
1answer
169 views

How to get first child of an item in content tree?

I am trying to get only one item under a specific page in the content tree using a query in variant. I tried query:.//* but it gets all children under that item. I only need the first one. Any ideas?
0
votes
1answer
175 views

SXA Add Query in the variant definition

I am using SXA 1.7 and need to add a Query item under my variant definition, I found that the query should be written using sitecore query format like "query:./*" to return the child items but it ...
2
votes
1answer
259 views

Controller action not called due to rendering datasource containing query:/

The existing project is upgraded from Sitecore 8.0 to Sitecore 9.0u1. After that, I've observed that few renderings are not working. The root cause is, controller rendering datasource query. If ...
0
votes
2answers
877 views

Multilist source query to exclude items whose parent has a specific template id

I'm on Sitecore 8.1 and I have an item that has a multilist that allows a user to select all items under a site, but I want to exclude a couple items and their descendants. The basic tree structure ...
3
votes
2answers
944 views

Why we should not use fast queries in Sitecore

As per blogs and best practices of Sitecore, its advised that fast queries should be avoided. The reason for that is fast queries will directly access the DB and fetch the results which causes ...
6
votes
2answers
2k views

Get all Children in the order defined in Sitecore

I have following structure in sitecore > Country > India > Srilanka > Bangladesh The following query returns all the child items but in alphabetical order string ...
1
vote
1answer
271 views

Sitecore hosting on AWS with Blue/Green deployment for zero downtime

We are currently having Sitecore 8.2 update 6 runs on AWS. We are planning to implement Blue/Green deployment for zero downtime and disaster recovery. The plan is to have 2 set environments as Blue ...
0
votes
1answer
175 views

Error During Upgrading Sitecore 8.1 to Sitecore 9.0.1

Hi all i'm getting the following Exception while upgrading the instance: 6848 07:38:16 FATAL [Experience Analytics]: Failed to synchronize segments. Message: Object reference not set to an instance ...
1
vote
0answers
165 views

Search filter for Year on a date field in template

I am using Sitecore 9.0.1 with SXA components. I have checked the SXA out of the box components for search functionality. For date fields, we have date range by which we can filter items in a specific ...
0
votes
1answer
90 views

Add renderings for all specific folder items using PS

We have a following structure : master:/content/market1/myfolder master:/content/market2/myfolder master:/content/market3/myfolder etc. I would like to add renderings for all items within "...
0
votes
1answer
115 views

Finding siblings in buckets

We've a folder item which stores all new artciles. This item is bucketable. But after turning into a bucket, we are not able to find previous and next sibling of an item under bucket. The below code ...
0
votes
0answers
306 views

How to automatically escape item paths for use in Sitecore query

Is there some API utility method which can automatically escape an item path for use in a Sitecore query? I am building a query string in code which uses an item path. If the item path contains a ...
0
votes
1answer
187 views

Multi list with search not working for Italian language

I have issue in Multi list with Search in Sitecore. I'm using Sitecore 8.1 along with Solr 6.5. I'm using the below query to load the items in the multi list. Items are loading perfectly on English ...
0
votes
1answer
528 views

Multilingual - Sitecore General Link Field Url Giving Embedded Language in Wrong Format

I have a requirement where my URL should be in format : http://domain/de-DE/pagename I have following settings done for my site: <setting name="Languages.AlwaysStripLanguage"> <patch:...
1
vote
1answer
81 views

Issue with publishing in Sitecore, datasource is not set for few items

I have a Sitecore 8 project where we have created a component for the editors to use. On that editor we used product detail where image carousel is being used to display images. An image carousel ...
5
votes
1answer
253 views

Sitecore Query - Restrict to context Language (in RSS feeds)?

I am using Sitecore's RSS feed, which has a field for Items. You can set this field to a Sitecore query to find items within your website to show within your RSS feed. I have it configured like so: ...
0
votes
1answer
68 views

Anchor tag not scrolling in EXM Generated in Outlook and GMail

I am sending email from Sitecore EXM 3.3. The email has a list of the Article as links on top and detailed articles list are at the bottom of the email. When user will click on an article link, the ...
2
votes
1answer
4k views

How to query for items under @@id with specific @@templateid

I'm trying to query a folder under the media library which has a bunch of templates based on a custom File template. I've tried to play around with a couple approaches but none of them have been ...
2
votes
0answers
103 views

Item Query not returning results when search with custom field in Arabic language

I am using Item Query to get featured Items using Isfeatured field in template, so my query like this: +template:{A0ABC519-3848-4930-965A-90F9F1B7F319};custom:isfeatured|true;language:english It is ...
1
vote
2answers
941 views

Setting up Datasource in templates

I have a Droplink field and I am trying to set the data source in the templates. What I want to do is set the data source by id instead of path and also add a filter by templates For example query:/...
3
votes
1answer
2k views

Get item by Display name in sitecore

How can I fetch the item by display name? The below code is not working: string url = string.Concat("fast:/sitecore/content/KeenanDirect/#" + string.Format(blogtype) + "#//*[@@Display name='", ...
6
votes
2answers
349 views

Is there a way to reference another database in Multilist with Search

I created a user content generated database in Sitecore where I will store my users and their comments. I plan to have a subscriptions item bucket that will be stored in the web database (published ...
3
votes
3answers
668 views

Site navigation - how to best to set the active class of all parent items of the current context page item?

I have a multilevel navigation control and I would like to add an active class and aria-expanded="true" to the <a> tag when one of the item's descendants' ID matches the Html.Sitecore()....
3
votes
1answer
96 views

Sitecore 7.2 Analytics DB records grown in size to 200 GB+

Sitecore 7.2 Analytics DB records has grown in size to 200 GB+. Does anyone know of any recommendation for purging old data and this is a production setup so the impact of this data being removed ...
4
votes
2answers
2k views

Retrieving multiple items in treelist query

How can I get a query-based treelist to return a list of items relative to the current item, that fits a template, instead of only the first result Search structure: -Parent Item --Segments ---Item ...
6
votes
1answer
537 views

Why Multilist with search is not showing data in case of data source content setup in multilingual?

We have found one issue when we add a data source to the field MULTILIST with search it works fine but in case if we add a new language version for that data source then it’s giving only first three ...
3
votes
1answer
399 views

Showing selected folder from the content node in tree-list is not working

Showing selected folder from the content node in tree-list is not working. We have used the below query but looks like only parent node is visible not the child nodes. DataSource=/sitecore/content/...
2
votes
1answer
357 views

Where to find Visit Duration and Latest Date Visited in Code Behind

I am creating a process that reads in the Sitecore analytics contact collection and gets information needed for a report. It is read and inserted in SQL Server. Not sure how to get some of the fields ...