Show or don’t show a properties

I need to someone pass users for spfx webpart to show or not show a properties. Nativly we can do it by passing or not pass context web in getPropertyPaneConfiguration(). But the webpart will be on all sites. And I need to pass a link for the site where can I set users with example (SPPermission.createGroups. How could I do it ? I havve got this code:

  protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration { let contextWeb =  this.context.pageContext.web; let permission = new SPPermission(contextWeb.permissions.value); let hasPermission = permission.hasPermission(SPPermission.createGroups);  if(hasPermission) { return {   pages: [ 

but iI want with site contextWeb pass a url where the Users will be finding for SPPermission.createGroups. Not all sites, but specify site from the link. Please help me.

Map managed properties Path, OriginalPath to a custom property in SharePoint Online Search

We have a custom Content Type which we added to a SharePoint list in each site collection to save site metadata. Content Type has a url field named “Site URL” which just saves the site collection url. Now, when user searching for content the list item will show up and the url shows the list item display form url with ?ID=.

We like to map/prioritize the custom url property “SiteURL” to Path, OriginalPath managed properties, so actual site collection url maps to search result. But, it is not working that way. Properties mapped fine and below is the value for both.

ows_q_URLH_MSCProjectSiteURL, ClientUrl, Basic:11

Any ideas please suggest.

-Praveen.

Display templates, managed properties showing null

In Sharepoint Online,trying to display one site collection list columns in another site collection using search and dispaly templates List:/sites/UAT/Lists/SearchTestList/AllItems.aspx enter image description here

1.Mapped the crawled properties with managed properties in both the site collections enter image description here same mapping in /sites/UAT and /sites/Classic

2.Created a basic search center in /Sites/Classic and through query rules I am able to get the results

enter image description here

=>In Item_Default display template , I have added these Properties as ‘RefinableString148′:’RefinableString148′,’RefinableString149′:’RefinableString149′,’RefinableString150′:’RefinableString150’

=>In display templates, I am displaying as below

 <ul> <li>    _#= ctx.CurrentItem.RefinableString148 =#_ </li> <li>    _#= ctx.CurrentItem.RefinableString149 =#_ </li> <li>    _#= ctx.CurrentItem.RefinableString150 =#_ </li> <li>    _#= ctx.CurrentItem.Title =#_ </li> <li>    _#= ctx.CurrentItem.LastModifiedTime =#_ </li> </ul> 

But the output is only displaying Title and LastModifiedTime of items enter image description here

But the same properties are showing in Refiners enter image description here

Am I missing anything or doing anything wrong? Any help would be appreciated.

Unable to Edit Web Part Properties in Web Part Zone in 2013

I have a custom page layout that I have designed using Visual Studio. Within it I have several web part zones and I have a zone where I would like users to be able to edit the properties of the web part within the Zone Template. Regardless of whether I add a custom web part or an out of the box SharePoint webpart to the zone template when you are in edit mode in the UI the drop down for the web part properties is missing and if you select the web part and use the ribbon all of the options are grayed out. This occurs in all browsers.

enter image description here

Here is what the zone is setup like:

<WebPartPages:WebPartZone runat="server" AllowPersonalization="true" AllowCustomization="true" AllowLayoutChange="false" FrameType="TitleBarOnly" ID="testWPZ">     <ZoneTemplate>         <PulseWebparts:SiteAdditionalLinks                          runat="server"                          ChromeType="None"                         Description="Description goes here"                         ImportErrorMessage="<%$  Resources:core,ImportErrorMessage;%>"                         Title="Site Additional Links"                         __MarkupType="vsattributemarkup"                         __WebPartId="{47B54663-CDB9-4A8D-ABAD-00978B0969EC}"                         WebPart="true"                         IsClosed="false"                         ID="siteAdditionalLinksWebPart"                         SuppressWebPartChrome="false"                         AllowEdit="true"                         ZoneID="testWPZ"/>          <WebPartPages:ContentEditorWebpart ID="testContentEditor" runat="server" webpart="true" AllowEdit="true" FrameState="Normal" ></WebPartPages:ContentEditorWebpart>     </ZoneTemplate> </WebPartPages:WebPartZone> 

I don’t know if I’m missing a property within the zone or maybe there’s a setting for the page layout in the element xml that I am missing or need to have.

Here is the element xml for the page layout:

<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/">      <Module Name="PulseSubSiteLandingPageNEAL" RootWebOnly="TRUE" Url="_catalogs/masterpage/pulsepagelayouts" Path="SubSiteLandingPageNEAL">         <File Url="PulseSubsiteLandingPageNEAL.aspx" Type="GhostableInLibrary" ReplaceContent="TRUE" Level="Published">              <Property Name="Title" Value="Title"/>              <Property Name="FileLeafRef" Value="PulseSubsiteLandingPageNEAL.aspx"/>              <Property Name="MasterPageDescription" Value="Description"/>              <Property Name="UIVersion" Value="15"/>              <Property Name="PublishingHidden" Value="FALSE"/>              <Property Name="PublishingAssociatedContentType" Value=";#Pulse Subsite Landing Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900E19C10C741B041E5A6E4BE278D2CEA29;#"/>              <Property Name="HtmlDesignAssociated" Value="FALSE"/>              <Property Name="ContentType" Value="$  Resources:cmscore,contenttype_pagelayout_name;"/>              <Property Name="_ModerationStatus" Value="0"/>              <Property Name="FileDirRef" Value="_catalogs/masterpage"/>              <Property Name="FSObjType" Value="0" />          </File>      </Module> </Elements> 

I should mention as well that if I add either webpart manually using the UI to a web part zone I can get to the properties of the webpart.

Any help would be appreciated. Thanks.

Is there a way to check connection properties of an active SQL Server connection?

The context:

I have a Java application that’s using HikariCP for its connection pooling solution. While lightning-fast, HikariCP doesn’t have a lot of configuration options, by design, and that’s all fine and dandy except I need to set a connection property, and while a DataSource like Tomcat’s gives me the ability to do something like:

tomcatDataSource.setConnectionProperties("someProperty=true"); 

Hikari’s DataSource object doesn’t have such a method.

My options, as far as I’ve been able to tell are to either create a DataSource object manually and pass it to Hikari to wrap it in it’s own class, or to include the connection property as part of the connection URL.

(Just to make sure we’re on the same page, I’m talking about the “sendStringParametersAsUnicode” flag as described in this document: Setting the connection properties – SQL Server)

The question (also known as “so far this question seems to belong in StackOverflow but hopefully you kept reading”):

Is there a way, on the database side, to see the connection properties of an active connection? In SSMS or some other tool? I tried SSMS’s activity monitor on the target database, and right clicking on anything that seemed right-clickable, but nothing mentioned the properties of the open connections. Is this even possible?

I’d like to see the properties so I can double-check if my two options described above for setting this flag actually work.

Is there a way to check connection properties of an active SQL Server connection?

The context:

I have a Java application that’s using HikariCP for its connection pooling solution. While lightning-fast, HikariCP doesn’t have a lot of configuration options, by design, and that’s all fine and dandy except I need to set a connection property, and while a DataSource like Tomcat’s gives me the ability to do something like:

tomcatDataSource.setConnectionProperties("someProperty=true"); 

Hikari’s DataSource object doesn’t have such a method.

My options, as far as I’ve been able to tell are to either create a DataSource object manually and pass it to Hikari to wrap it in it’s own class, or to include the connection property as part of the connection URL.

(Just to make sure we’re on the same page, I’m talking about the “sendStringParametersAsUnicode” flag as described in this document: Setting the connection properties – SQL Server)

The question (also known as “so far this question seems to belong in StackOverflow but hopefully you kept reading”):

Is there a way, on the database side, to see the connection properties of an active connection? In SSMS or some other tool? I tried SSMS’s activity monitor on the target database, and right clicking on anything that seemed right-clickable, but nothing mentioned the properties of the open connections. Is this even possible?

I’d like to see the properties so I can double-check if my two options described above for setting this flag actually work.

Lookup Columns in Word desktop are greyed out in properties pane

I am working with SP on Prem 2019. Users perform File->Save As from word or excel desktop apps and try to save it to the desired document library in sharepoint. The save fails as it expects required metadata to be populated prior to save. For some reason, lookup columns are greyed out.

I have seen in some cases where if ‘Show Details’ is clicked, it opens up separate window where lookup field value can be populated but in my case, its greyed out and can’t be clicked, see screenshot below.

enter image description here

Deal Name and Document type are both lookup columns and the threshold count is not exceeded at all. Is this a behavior by design, if someone came across this and found a solution , please shed light. Thanks in advance.

P.S: I tried this on sharepoint online too and was able to reproduce same issue. Not sure if its a behavior by design.

Error: Unexpected response data from server – user Profile properties displays

I get the mentioned error message when i try to display the User Profile properties by using JSOM(Java Script Object Model) Error: Unexpected response data from server. The error occurs for around 1 min or 5-6 refresh , after that it works as expected . What could be the reason ? Please find the code below:

<script type="text/javascript">     var personProperties;      // Ensure that the SP.UserProfiles.js file is loaded before the custom code runs.     SP.SOD.executeOrDelayUntilScriptLoaded(getUserProperties, 'SP.UserProfiles.js');      function getUserProperties() {          // Replace the placeholder value with the target user's credentials.         var targetUser = "VMDEV\XXXX";          // Get the current client context and PeopleManager instance.         var clientContext = new SP.ClientContext.get_current();         var peopleManager = new SP.UserProfiles.PeopleManager(clientContext);          // Get user properties for the target user.         // To get the PersonProperties object for the current user, use the         // getMyProperties method.         personProperties = peopleManager.getPropertiesFor(targetUser);          // Load the PersonProperties object and send the request.         clientContext.load(personProperties);         clientContext.executeQueryAsync(onRequestSuccess, onRequestFail);     }      // This function runs if the executeQueryAsync call succeeds.     function onRequestSuccess() {          // Get a property directly from the PersonProperties object.         var messageText = " \"DisplayName\" property is "             + personProperties.get_displayName();          // Get a property from the UserProfileProperties property.         if (personProperties.get_userProfileProperties()['FirstName'] != "")         {             messageText += "<br />\"FirstName\" property is "                 + personProperties.get_userProfileProperties()['FirstName'];         }         // Get a property from the UserProfileProperties property.         if (personProperties.get_userProfileProperties()['Department'] != "") {             messageText += "<br />\"Department\" property is "                 + personProperties.get_userProfileProperties()['Department'];         }          // Get a property from the UserProfileProperties property.         if (personProperties.get_userProfileProperties()['WorkPhone'] != "") {             messageText += "<br />\"WorkPhone\" property is "                 + personProperties.get_userProfileProperties()['WorkPhone'];         }          // Get a property from the UserProfileProperties property.         if (personProperties.get_userProfileProperties()['SPS-Department'] != "") {             messageText += "<br />\"SPS-Department\" property is "                 + personProperties.get_userProfileProperties()['SPS-Department'];         }           // Get a property from the UserProfileProperties property.         if (personProperties.get_userProfileProperties()['Fax'] != "") {             messageText += "<br />\"Fax\" property is "                 + personProperties.get_userProfileProperties()['Fax'];         }          // Get a property from the UserProfileProperties property.         if (personProperties.get_userProfileProperties()['HomePhone'] != "") {             messageText += "<br />\"HomePhone\" property is "                 + personProperties.get_userProfileProperties()['HomePhone'];         }          // Get a property from the UserProfileProperties property.         if (personProperties.get_userProfileProperties()['CUS-CSIFS'] != "") {             messageText += "<br />\"WXY-CSXYZ\" property is "                 + personProperties.get_userProfileProperties()['CUS-CSIFS'];         }          $  get("results").innerHTML = messageText;     }      // This function runs if the executeQueryAsync call fails.     function onRequestFail(sender, args) {         $  get("results").innerHTML = "Error: " + args.get_message();     } </script> 

Document Properties Under Quick Parts Don’t Update When A New Column Is Created

I have a SharePoint 2013 site that contains a document set with multiple content types. Each content type has its own document template. When I open a document template in Word, and then select Quick Parts -> Document Property, I can see all the properties related to the content type. However, if I add a new column to the content type and then open the template again in Word, I don’t see the new column in the list of properties when I select Quick Parts -> Document Property. Is there an additional step that needs to be taken after a new column is added, in order for it to show up under Quick Parts?