Content query how to clean up # in multiple choice fields

I have a managed metadata as a multiple choice field and a simple choice field. When surfaced in a CQWP the metadata shows well while the choice shows as:

#Choice1;#Choice2 

I want to get rid of the # and found this code. I tried to enter it in ItemStyle but obviously I put it in the wrong place, where should I put it to make it work? or do I have to change something in it?

enter image description here

SharePoint Search Query – Filter item by user & groups from the current user

In a web part, I wanted to show only items that people had permissions on. I know I can stop inheriting permissions on the list and give them unique permissions, but that’s not what our client wants. So we created a column of people and groups (linked to Azure AD groups) we wanted to be able to filter in the search query only items where the user belonged to the group the item is associated with. Is this possible?

Thank you.

how to get this CAML query to work

I have a javascript and i can’t get the CAML or listitems.

//http://vadimtabakman.com/nintex-forms-multilingual-form.aspx  NWF$  (document).ready(function () {     var language = NWF$  ('#' + varLanguage);      language.change(function() {     //alert(language).val(); // else alert error message      var languageValue = this.value.split(";#")[1];     alert(languageValue);      var clientContext = SP.ClientContext.get_current();         var oList = clientContext.get_web().get_lists().getByTitle('Survey Label Translation');      var camlQuery = new SP.CamlQuery();     alert('line 15');     camlQuery.set_viewXml(         '<View>' +             '<Query>' +                 '<Where>' +                      '<Eq>' +                         '<FieldRef Name=\'Language\'/><Value Type=\'Choice\'>' + Spanish + '</Value>' +                     '</Eq>' +                 '</Where>' +             '</Query>' +         '</View>'         );       alert('line 26');     this.collListItems = oList.getItems(camlQuery);     clientContext.load(collListItems);       alert('line 30');     alert(collListItems.status);     if (collListItems.status == 200)      {        var rows = collListItems.responseXML.getElementsByTagName('z:row');         for(x=0; x < rows.length; x++)        {          var listLabelID = rows[x].getAttribute('ows_Title'); // query field + ows prefix          var listTranslation = rows[x].getAttribute('ows_Translation'); // query field + ows prefix          translations[listLabelID] = listTranslation;          var node = NWF$  ('.' + listLabelID).find('.nf-label-control');          node.text(listTranslation);        }      }      else      {        alert('There was an error: ' + collListItems.statusText); // else alert error message      }       }); }); 

How can I Query a Knowledge Graph?

One approach for querying knowledge graph is to use nearest neighbor (NN) data structures. Read the paper On Integrating Knowledge Graph Embedding into SPARQL Query Processing for more details. Roughly speaking, the authors redesign the loss function used for knowledge graph embedding methods to generate vector representations that improve the NN search performance. For example:

enter image description here

Nonetheless, the following fact is know:

It is known that using the same embedding space to represent both entities and relations is less competitive compared to considering two separate spaces. (source: LogicENN: A Neural Based Knowledge Graphs Embedding Model with Logical Rules).

My question is: Since there are embedding which represent entities and relations in different spaces, how can I use NN methods to ask a Knowledge Graph?

Update REST query based to get items from List in SP 2013

I have a query in REST API which is :

var i = _spPageContextInfo.webAbsoluteUrl + "/_api/web/Lists/GetByTitle('Pages')/GetItems(query=@v1)?@v1={"ViewXml":"<View Scope='RecursiveAll'><Query><Where><And><BeginsWith><Fieldref Name='ContentTypeId' /><Value Type='ContentTypeId'>Content type value here</Value></BeginsWith><And><Eq><FieldRef Name='FieldNameHere' /><Value Type='Boolean'>0</Value></Eq><Eq><FieldRef Name='SomeFieldName' /><Value Type='Boolean'>0</Value><Eq></And></And></Where><OrderBy><FieldRef Name='SomeField' Ascending='False' /></OrderBy></Query></View>"}"  

As you can see this is a POST call and not a GET call. I need to change this to a GET call since POST is giving me permission related issues, in that the above query will only work for people with Contribute and above level permissions. It won’t work for People with Read Access.

One option I thought would be to use the “items” API query but I’m not sure how I can pass the above Caml Query to it

var i = _spPageContextInfo.webAbsoluteUrl + "/_api/web/Lists/GetByTitle('Pages')/items?CamlQueryConditionhere?$  select=Fields.." 

Any Help would be appreciated

SQL Query- field calculation based on date

I’m writing a query for sales targets per week, however I’m getting a little stuck on this. Targets are per month, per year, so for example, Brand A has a monthly target (changes each month)

The snippet from the report is as follows: SELECT BrandName ,SUM((TargetMonThur *4) +TargetFriday) WHERE [MONTH] IN (DATEPART(MM,@DAY1),DATEPART(MM,@DAY2),DATEPART(MM,@DAY3),DATEPART(MM,@DAY4),DATEPART(MM,@DAY5)) AND [YEAR] IN (DATEPART(YY,@DAY1),DATEPART(YY,@DAY2),DATEPART(YY,@DAY3),DATEPART(YY,@DAY4),DATEPART(YY,@DAY5)) However the issue appears when the start of the week/ end of the week is a different month to the other days. at this point, it calculates both month’s targets * 4.

I think I’m being a complete noob on this, but any help would be great.

Thanks in advance

Why does the query to the Sharepoint API search on the internet explorer not work?

I am using the api search to make a query and get the value of a refinablestring. A basic example of the query I am doing is the following.

https://mysite.sharepoint.com/_api/search/query?querytext='Path:https:%2f%2fmysite.sharepoint.com%2fsites%2fIntranet%2fLists%2fmylist%2f'&rowlimit=100&selectproperties='RefinableString00%2cCreatedBy%2cListItemID'&refinementfilters='and(RefinableString03: %22*myValueA*%22 ,RefinableString01: %22*myValueB*%22 )'&sortlist='LastModifiedTime:descending'&clienttype='UI' 

To find out what the problem was, I tried to launch the query directly in the address bar of the browser. If I run it on google chrome, it correctly returns the results within a table inside the RelevantResults tag that is inside the PrimaryQueryResult tag.

But the problem comes if I run the same query in internet explorer, in that case the result table is empty. The query is exactly the same in both cases.

Anyone know what the problem may be for this to happen? Do I have to add some specific configuration in internet explorer for this to work?

Any help will be appreciated.

Thanks.

Content Search WebPart: query Date and Time field

I have calendar list, Now trying to query items which is greater than Today.

so first I have created new managed property with name EventDate and mapped the crewel property ows_EventDate with type Date and Time enter image description herewhen I am used that property in content Search web part query text, it shows error : “We didn’t understand your search terms. Make sure you’re using the proper

enter image description here

Query Builder KQL return only items/folders at top level

I’m using content search webparts with cross-site publishing in an on-prem SP2013 site. I’ve got a result source that is limited to a specific library using Query text:

{searchTerms?} (contentclass:sts_listitem OR IsDocument:True) SPSiteUrl:https://sites.sp.kp.org/teams/lscsp-cat10 ListId:0cd3f39e-61e4-456e-a149-85cb79292589 

That retrieves all items from the list — which includes individual documents, folders, and document sets. I want to only retrieve items at the first level of the library. Only documents and folders at the top level, not documents inside folders or document sets.

I’ve been looking through these tutorials on KQL and find lots of ways to limit to the parent of a term set.

I did find the managed property ParentLink and am using something like this:

ParentLink:'https://<site>/<library name>/Forms/AllItems.aspx' 

Which does work because the parent link for anything in a folder will be different. But that seems pretty much like a bad hack.

Is there an official way using KQL to tell a CSWP “Only contents of this folder, don’t look in nested folders.”?