how to display radio buttons and choice fields horizontally in SharePoint 2013

how to display radio buttons and choice fields horizontally in SharePoint 2013

In this article we can able to see how to display radio buttons and choice fields horizontally.
By default it will display vertically , for better look and feel at the time of customizing we want to display init horizontally.

//dispaly radiobuttons horizontally
var getRadio = $("#showhor .ms-RadioText:eq(0)")
$("#showhor .ms-RadioText:gt(0)").appendTo($(getRadio));

HTML Form 

Select all that apply:
<span id="showhor" data-displayName="Status"></span>

Create CallOuts in SharePoint

Create CallOuts in SharePoint
In this article we can able to see how to use callouts in SharePoint

In my requirement  having a status column having multiple drop down values , i will need to explain about the values available in the drop down.

For that i used Callouts which is newly introduced in SharePoint2013.


function mycallOuts(){
SP.SOD.executeFunc("callout.js", "Callout", function () {
SP.SOD.executeFunc('sp.js', 'SP.ClientContext'); 
         var _getstatusid = document.getElementById("calStatus");
         var listCallout10 = CalloutManager.createNew({ 
         launchPoint: _getstatusid,
         beakOrientation: "leftRight", 
         ID: "CallOutID", 
         content: '<b>Red</b> <br>Rejected<br></br> <b>Green</b> <br>No Action Requried<br><br>'

HTML Form 

<td>Status of Current Task <span id='calStatus'><span>
 <td><span class="myownclass" data-displayName="Status"></span></td>

Cascading Dropdown list in SharePoint using InfoPath

In this article I explain how to create cascading dropdown based on state and city.
I created State, City and Address list with lookup.

Open Address list, Click on “Customize Form” under List tab. It will open InfoPath designer, now we can customize List Form.
Right click on City dropdown list control -> select Drop-Down List box Properties.
In Data Source -> click “Add” button.
 In Data Connection wizard, click “Next” button
Select “SharePoint library or list” -> Click “Next” button.
Enter “SharePoint site details” -> Click “Next” button.
Select a list of library, choose “City” -> Click “Next” button.     
In select fields: select State, City Name and ID -> Click “Next” button.

Next screen, click “next” button.
Leave the default name (City1) and click “Finish” button.

We can see now Data Source of Drop-down list box is City1
Click on tree button to select XPath, in Entries section.
Click “Filter Data” button.
 Click “Add” button in Filter Data

Choose a field or group... in the first drop-down list.

Choose City1 Data source and select State -> click “Ok” button.
Now select a field or group… in the last drop-down list
Select Main as Data Source then choose State in data Fields -> click “OK” button

Click “OK” to close specify Filter Conditions dialog
Click “OK” to close Filter Data dialog
Click “OK” to close Select a Field or Group
In Drop Down List box properties, choose d:ID in Value: section -> click “OK” to close this
Now Save and Publish the InfoPath Form view.  Go to Address list and Click new item.

Here we can see only state related cities in the dropdown list. 

How to Export and Import SharePoint Designer Workflows.

Open the SharePoint site in SP Designer, Click on workflows which is available in the left hand side.
Click on the workflow that you want to export as per the below screen shot.
Save the workflow as per the below.
 Workflow is saved in your system in VMI format.
How to Import SP Workflow
Now if you want to import the same workflow in any other site.
Follow the steps as per the below.
1)Add the .ZIP extension for the imported workflow and click on YES as per the below.
2)Open the Zip folder and delete the workflow.xoml.wfconfig.xml as highlighted in the below.
3)Right click on the workflow and remove the .ZIP
4)Again we can able to see the workflow in .VMI Extension.
5)Open the Site in SPDesigner that you want to Import the workflow into that particular site.
6)Click on “Import from Viso” as per the below screen shot.
7)Select the workflow path and click on Next.
8)Select the list that you want to associate the workflow and click on Finish.
9)Save the Workflow and update the changes in your workflow then save and publish.

Errors were found when compiling the workflow the workflow files were saved but cannot be run

We are getting the error “Errors were found when compiling the workflow the workflow files were saved but cannot be run “when we are trying to publish the workflow.
 In my scenario we restored the site from Dev to QA environment, once restore completed we are can able to see the work flows in SharePoint designer. I created a new item in the list but workflow did not triggered. We opened the designer and try to publish we are getting the below error. 

 In designer we identified that there is no associated list for this workflow, we have to give the current site List ID in the .WFconfig.xml file. To give this List ID we have to follow the below steps.
 Open the site in SP Designer
Click on “All Files”
Click on Workflows
In All Files expand the Workflows click on +
Again expand the particular workflow, there you can able to see the couple of files, open the .WFconfig.xml file in advanced mode there we can able to see the <Association ListID =”{previous list id}” , place the current site list id and save it.

Now you can able to see the workflow is Associated with list. We can able to Save and publish the Workflow without any issues.

Sending Approval Request Approval Failed in SharePoint 2013

For one of the site we given site owner email address in “Access request settings” , if anyone trying to access  the site who don’t have permissions they  will request for access to that site email will come to site owner.
 When site owner is trying to approve the request he was getting the error “Sending Approval Request Approval Failed” as per the below screen shot.

Navigate to “permsetup.aspx” page in the same site, URL looks like

Select the radio button option “Use an existing group”
In owners Group select the current owners Group name available in the current site and click on Ok.
Now you can able to approve the requests.

Another site or list is still using this content type. If you would still like to delete it, please remove the content type from all sites and lists and then try again.

When we are trying to delete the content type we are getting the below error.
Another site or list is still using this content type. If you would still like to delete it, please remove the content type from all sites and lists and then try again.

In my case I already deleted the list, but still I am facing the same error message. The same list is available in the recycle bin, follow the same steps as per the below.

Delete from site recycle bin.
Delete from Site Collection > Site Settings > Site Collection Administration > Recycle Bin.
Delete from End User Recycle Bin Items.
Path: _layouts/15/AdminRecycleBin.aspx
Delete from "Deleted From End User Recycle Bin."
Path: layouts/15/AdminRecycleBin.aspx?View=2
Now you can able to delete the content type successfully.

New-SPConfigurationDatabase : The user does not exist or is not unique

When we are trying to install SharePoint 2016 using PowerShell we got the below error.
“New-SPConfigurationDatabase : The user does not exist or is not unique ” as per the below screen we face the issue.
Resolution: Make sure once you run this command in the PowerShell credential popup window will come.

New-SPConfigurationDatabase –DatabaseName SharePoint_Config –DatabaseServer DNSP2016 –AdministrationContentDatabaseName SharePoint_Content –Passphrase (ConvertTo-SecureString DotNetSharePoint2016–AsPlaintext –Force) –FarmCredentials (Get-Credential) -localserverrole SingleServerFarm

We have to enter MachineName\UserName  as per the above screen shot.

Monitoring disk space utilization using powershell

Monitoring disk space utilization is an important task in SharePoint to avoid the critical issues , we can implemented this using PowerShell to monitor the disk utilization , in this we did not kept any threshold conditions , we are generating only report in CSV format with list of all servers available  in our  environment.
We created a config file to add all servers that you want to know the disk space utilization.
Added the server names as per the below screen shot in the text file.

Please note: we are generating this only in CSV format, it is a plane text we cannot add any colors in our output file.

Add-PSSnapin microsoft.sharepoint.powershell
$resultsarray = @()
$computers = (Get-Content "d:\Allservers.txt")
$date = Get-Date -Format “dd-MM-yyyy”
foreach($computer in $computers)
Write-Host $computer
 $drives = Get-WmiObject -ComputerName $computer Win32_LogicalDisk | Where-Object {$_.DriveType -eq 3}
 foreach($drive in $drives)
  $contactObject = new-object PSObject
   $id = $drive.DeviceID
 $totalsize = [math]::round($drive.Size /1GB, 2)
 $freespace = [math]::round($drive.FreeSpace  / 1GB, 2)
 $usedspace= $totalsize-$freespace
 $freeprecent = [math]::round($freespace / $totalsize, 2) * 100
 $diskObject | add-member -membertype NoteProperty -name "Date" -Value $date
 $diskObject | add-member -membertype NoteProperty -name "Server Name" -Value $computer
 $diskObject | add-member -membertype NoteProperty -name "Drive" -Value $id
  $diskObject | add-member -membertype NoteProperty -name "Total GB" -Value  $totalsize     
   $diskObject | add-member -membertype NoteProperty -name "Used GB" -Value $usedspace   
 $diskObject | add-member -membertype NoteProperty -name "Free GB" -Value $freespace  
    $diskObject | add-member -membertype NoteProperty -name "% Free" -Value $freeprecent  
$resultsarray += $diskObject
$resultsarray| Export-csv -path "D:\diskreport_$date.csv" –notypeinformation

Delete SharePoint list items based on particular view using PowerShell

Send email to members of SharePoint Group using PowerShell

In this article we can see how to send email only from a particular group of people using power shell, it is very easy to user to remove/add new users whenever they want. In the below code we created a SharePoint Group with name “DotNetSharePoint”

add-pssnapin microsoft.sharepoint.powershell
$web = get-spweb -identity  ""
$groupss = $web.Groups.GetByName("DotNetSharePoint")
$emailgrouptoo =@()
foreach($user in $groupss.Users)
$sendemailto  =  $user.Email
$totalemail =  $sendemailto
#You can also get this below information from Custom List also , in the article we are mainly showing how to send email to Owners Group Using PowerShell.
$smtpserver = "yourSMTP severname"
$emailfrm  =  "emailidfrom whom you have to send this email"
$Subject =  "We are sending email to Users"
$EmailBody  = "You type some information which you want to show in side the email body"
 send-mailmessage -smtpserver $smtpserver -from $emailfrm -to $emailgrouptoo  -subject $Subject -body $EmailBody

how to get the current item id for newly created item in SharePoint

In this article we can able to see how to get the current item id for newly created item, using REST API and JQuery.
 We are having a requirement to store the current item id in a Field, once we clicked on the custom save button.
We are having filed with name “RequestID” and couple of fields and having a custom button.
Call this function on “getNewRequestItemID” button click and use the below code.

<script type="text/javascript" src="/Dotnetsharepoint/SP2013/SiteAssets/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
$(function () {
 var listname = "YOURLISTNAME";

function getNewRequestItemID(listname){
var currentitemid=0;
var siteURL = _spPageContextInfo.webAbsoluteUrl;
 var url = siteURL + "/_api/web/lists/getbytitle('" + listname + "')/items?$select=ID&$OrderBy=ID desc&$top=1";
 url: url,
 method: "GET",
 async: false,
 headers: { "Accept": "application/json; odata=verbose" },
 success: function (data) {
        currentitemid = data.d.results[0].ID;
  $("input[title = 'RequestID']").val(currentitemid);
 error: function (data) {      
 get the current item id for newly created item in SharePoint using javascript

Microsoft Flow Features

Create automated workflows between your favorite apps and services to get notifications, synchronize files, collect data, and more.
Flow app in SharePoint Office 365
Now Microsoft Flow supporting 90 services. SharePoint, OneDrive for Business, Dynamics 365, OneDrive, SQL Server..Reference:             
New Features:
 Search by service
Users will be able to see all the triggers from a service by simply selecting that service. Also, once a trigger is selected, the same process can be done to add an action, as can be seen in the following screenshots.

Switch Case
It is an important addition to the already available nested conditionals support, and it "will make it very easy to have parallel branches of conditional logic based on a single value".
You can find switch by selecting the More … option after selecting New Step and then choosing Add a Switch Case. Inside a Switch Case you will select a value from the trigger or a previous step to switch on.
Office 365 and services
Trigger when an email is flagged – for example, you can now automatically create a task in Todoist (or Wunderlist) whenever you flag an email in Outlook
Flag an email as an action – create filters to flag emails – for example, automatically flag emails that come from your manager
Move an email to another folder – you can also automatically move emails between folders
Connect to Local or Network File Systems and Stripe
Flow can now connect to your Local File System or a Network File System. You can log or copy files from your own local Windows desktop PC to the cloud. Likewise, if you have a team Network Share, you can connect to that from Microsoft Flow.
Finally added four other Premium services: 

You can now use Stripe from Microsoft Flow. Stripe allows private individuals and businesses to accept payments over the internet. You can track customers, orders, invoices  and more. 

 Microsoft Flow integrates with Informix and DB2 so you can connect to resources stored in IBM Informix or IBM DB2 databases. We support SELECT, INSERT, UPDATE, and DELETE operations.

     UserVoice is a product management and customer support tool that allows businesses to build a suggestions portal for their users to submit feature ideas, build a ticketing system for customer support and build articles knowledge base for users.

Delete SharePoint list items based on particular view using PowerShell

In this article you can able to see how to delete  SharePoint list items based on the particular view and also having another condition how have to delete items on every Monday, we created a couple of views what type of data have to delete based on item created date.
One view is used to delete SharePoint list items every day and another delete only on Monday.

Note:  by default list item limit is 30 items, we have to modify the view based on the requirement I change to 5000 so every day it will delete only 5000 items to delete.

add-pssnapin microsoft.sharepoint.powershell
$web = get-spweb -identity ""
$MainList = $web.lists["DeleteListItems"];
$today = (get-date).DayOfWeek
if($today -eq "Monday")
$view = $MainList.Views["DeleteMondaylistitems"];
$view = $MainList.Views["DeleteEverydaylistitems"];
$items = $MainList.GetItems($view)
$totalcount = $items.Count
$j = 0;
for($i = $totalcount -1; $i -ge 0; $i--)
$deleteitem = $items[$i]
write-host $deleteitem.ID

How to add blank value to choice field in SharePoint

As per my requirement I want to show blank value in choice field, but SharePoint won’t take space as a valid option. So we can use ASCII code.
Method1: We can use Unicode character that does not print nothing. I tried with U+205F & it’s working as expected. To use this character please check the below steps.
1.    Navigate to Start -> run -> charmap

It will open Character Map Window.
Choose Font: Calibri, Drag down the cursor & select black check the code finally click copy the code

Paste the code in choice field and save.

Now check blank field. 

It’s working as expected.
Method 2: Use ASCII code 0129. It is empty character that SharePoint will accept as a valid option. It will appears empty on dropdown list. Hold down the ALT key and type the number 0129


.Net Interview Questions add custom button in sharepoint using javascript Add custom column property into a PageLayout in SharePoint Add Page Title on their browser's title bar in SharePoint Customly add zip files in blogger Add-SPOSiteCollectionAppCatalog : Must have Manage Web Site permissions or be a tenant admin in order to add or remove sites from the site collection app catalog allow list Advance SmartObject An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL. Angular 2 Angular JS Angularjs Angularjs 1 anonymous users accessing lists and libraries App Permissions for SharePoint 2013 membership unique email TreeView Control Attendees in SharePoint Auto refresh list using Content Editor WebPart in SharePoint 2013. Auto Refresh SharePoint list using JavaScript Block and unblock of attachment types in SharePoint Blogger C# Callouts in SharePoint 2013 Cascading Dropdown list in SharePoint change onenote to another location. change SuiteBarLeft in SharePoint 2013 check if userid exists in database c# click node text to expand/collapse in Treeview client object model Close webpart CQWP crate chart using BI site in PPS Create a modern team site collection in SharePoint online Create BI chart in PPS SharePoint 2013 create filter in dashboard designer. create kpi's in dashboard designer create kpi's in SharePoint 2013 dashboard designer Create List Create List In SharePoint Create List using Power Shell Script Create Lookup Field in List using Power Shell Script Create lookup field in List create SharePoint List custom view. create SharePoint List views in List Schema create site collection in site collection in SharePoint using powershell created Date Time calculated field in SharePoint Cross site Collection in SharePoint 2013 Crud Operation in Using Stored Procedure Custom MasterPage Approval in SharePoint custom view for survey list Customly add SharePoint List view in Page. delete items in sharepoint using powershell Difference between Angular 1.x & Angular 2 difference between Office 365 and Windows Azure difference between Windows Azure and Office 365 in sharepoint? DifferenceBetween discussion board Display Data in Grid View display radio buttons and choice fields horizontally in SharePoint 2013 Document library DotNet Drag and drop documents in document library in SharePoint dynamically populating values from one list to another list using jquery in sharepoint edit and delete buttons in datagridview Edit Links email notification using Nintex enable anonymous access in SharePoint 2013 enable app catalog sharepoint online site collection powershell Enable appcatalog site collection level using PowerShell based on Input file Enable versions for list and library except the hidden lists using PowerShell Script Error occurred in deployment step 'Recycle IIS Application Pool': Cannot resolve model for the project package Errors&Solutions Export document library in sharepoint using powershell Export particular Group in Term Store Management in SharePoint 2013 Export to Excel first release Flow Flow features free disk space on servers using powershell Friendly URLs and Managed Navigation in SharePoint 2013 get a list of site collection with template in web application using PowerShell Script in SharePoint Get attachments in SharePoint custom list using c# get current list item id sharepoint programmatically Get current url using jquery Get data from SharePoint list using Rest api & Angular JS Get Random Get Random SharePoint items using PowerShell Get Random values from SharePoint list using PowerShell Get url of the last value using jquery Get-SPOSite : The managed path sites/yoursitename is not a managed path in this tenant. Getting Email From User Hide “Edit Links” in left navigation SharePoint 2013 hide button in sharepoint based on permissions Hide column in SharePoint List view hide fields using client side object model Hide list in Quick Launch in SharePoint using PowerShell How to add Custom Tiles to SharePoint site Page. How to add extension files in Search Navigation in SharePoint 2013 How to Add Multiple users Using SharePoint People Picker How to add SharePoint list view in Page using C# How to Approve MasterPage using PowerShell in SharePoint How to bind Multiple users Using SharePoint People Picker how to change indicators on kpi performance how to check if an email address already exists in the database in how to configure workflow manager platform for SharePoint 2013 how to create calculated value using powershell how to create certificate in SharePoint How to create flow. how to create gantt chart webpart in sharepoint how to create KPI indicators in Dashboard designer How to create moden communication site in SharePoint online How to create Multi selected filter in Dashboard How to create nintex workflow in sharepoint how to create rdlc reports in How to Display Data Grid View in How to enable anonymous access in SharePoint How to find data in datagridview in c# How to get image names from the folder using C# how to get particular list content type id in SharePoint 2013 How to get QueryString value in SharePoint WebPart Programatically how to get the current item id for newly created item using REST API and JQuery how to hide list in sharepoint how to know who created list in sharepoint How to make a Site Collection Read-Only in SharePoint 2010 How to overlay Office 365 shared calendar on SharePoint Site how to pass jquery value to textbox control How to pass pagename as a browser's title bar in the page how to remove unused Application Pool in SharePoint how to remove zone using powershell script How to send mail to particular group of people using PowerShell how to update modified by and created by using powershell how to uplaod RAR files in blogger import csv data into sharepoint import data using powershell Import group to term store management using SharePoint 2013. InfoPath InfoPath Cascading Dropdown list Insert update delete in datagridview in C# winforms Integration from SharePoint to k2. K2 Smart Forms for SharePoint JavaScript Injection jquery JSON K2 blackpearl K2 Designer K2 Designer Workflow. K2 smartform cascading dropdown list k2 Workflow K2 workflow to send a mail with PDF left navigation Local Term Set in managed meta data Managed meta data navigation in SharePoint 2013 Managed metadata service in SharePoint 2013. Managed Navigation in SharePoint 2013. Managed Promoted Sites. meta data navigation Microsoft Flow New Features New-SPConfigurationDatabase The user does not exist or is not unique NintexWorkFlow Office 365 OneDrive OneNote overwrite existing document in sharepoint using javascript PDF Converter PDF Method in K2 Performance Point Service in SharePoint 2013 PerformancePoint Services Configurtion PerformancePoint Services Configurtion for SharePoint 2013 PerformancePoint Services in SharePoint Server 2013 Popularity trends in SharePoint 2013 Pages populate dropdown list dynamicallyusing jquery Power Power Automate Power Shell Power shell script to get SharePoint site size. PowerApps powershell read xml PowerShell Script PowerShell script to get list of users from SharePoint groups PowerShell Scripts in SharePoint 2013 Powershell to set the masterpage in SharePoint Promoted Links Promoted Sites psconfig.exe quick launch Rdlc reports Readonly Column in SharePoint Editview Realtime DotNet Interview Questions Recent Dotnet interview questions Recent SharePoint interview questions recover deleted OneNote page. OneNote content is missing Regional Settings in SharePoint 2013 Replace New Item text in SharePoint Rest API Schedule PowerShell Script Search in SharePoint 2013 Search navigation in SharePoint 2013 Secure store service SecureStore Services SecureStore Services configuration for SharePoint 2013 self-signed certificate on IIS Server Send email to members of SharePoint Group using PowerShell sharepint2010 sharepoin2010 SharePoint 2013 SharePoint 2010 SharePoint 2013 SharePoint 2013 Dashboard Designer SharePoint 2013 features SharePoint 2013 Interview Questions SharePoint 2013. SharePoint 2013.disable views from user to create SharePoint 2013.Power shell SharePoint 2013.SharePoint 2010 SharePoint 2016 SharePoint Administration SharePoint Alerts and Reminders SharePoint App Configuration SharePoint Apps SharePoint Bulk upload SharePoint Calculated field SharePoint Calendar View sharepoint interview questions SharePoint online interview questions SharePoint online training SharePoint Onprem vs Online SharePoint RealTime Online Training SharePoint2010 SharePoint2013 SharePoint2016 SharePointInterview SharePointOnline SharePointOnline;Restore deleted site;SharePoint 2013 show data in datagridview in C# Simple Insert update Delete Retrieve Clear in Site Collection Operations in SharePoint 2013 Site Collection Read-Only in SharePoint 2013 site contents Sorting & Filtering SPO SPSite Site Collection Operation parameters in SharePoint 2013 Step by step to create rdlc report in .Net Store names in text files in C# Sub site Subsite Term store management. The server was unable to save the form at this time. please try again UI New look update created by using client side object model update field values in SharePoint using powershell update items in SharePoint list using client object model update modified by field using client side object model upload zip files in blog use IsNullOrEmpty in PowerShell VirtoSoftware VirtoSofware vitrosoftware WebParts what is Document Set in SharePoint 2010 What is Filter in SharePoint Dashboard what is Limited-access user permission lock down mode feature What is Modern Team site What is Target Audience in SharePoint Who Created Site Using PowerShell Workflow in SharePoint 2013 Workflow management platform in SharePoint 2013 Workflow manager for SharePoint 2013 XSL-Template.