Wednesday 16 January 2019

Iconise ‘Add Picture’ control in PowerApps


Default look you get for ‘Add Picture’ control is not very appealing for end user and there is no OTB way of specifying icon for this control, except this that you can upload initial photo during design and that can stay as background until new photo is uploaded and overwritten previous one.


clip_image001[8]

 

There are couple of reasons as I understood.

 

1-      ‘Add Photo’ control allows user to specify either camera shot or photo from local device, in case of Desktop experience, its file explorer to choose an image file and appears as background

2-      Sub-Image control for ‘Add Photo’ is set when new media file is uploaded so if you tried to even set default image initially, it will get overwritten as control displays image preview hence no point of setting the icon at first place.

Regardless of all above limitations, I never wanted to use this control in default shape for user. So here is a quick workaround.

You will need a temporary image to hold uploaded image or camera shot, if you don’t use temporary image then adding image to collection variable will display image as cache link instead of base64 type. In case of my app the URL was like this one.

appres://blobmanager/081553xxxead4e3482eb480b0xxx2827/1

 

Here are quick steps to iconise ‘Add picture’ control (I’m using gallery control to hold images):

The control names are default names, in real app you will want them to be aligned with your naming conventions.

1-      From Media options, add ‘Add picture’ control and ‘Image’ control

clip_image002[8]

 

2-      From Gallery options, add Horizontal Gallery/or vertical whichever you like.

clip_image003[9]

 

 

3-      Now select ‘UploadedImage1’ control from left hand pane and set Image property to icon that you would like to set.

 

Remove this expression from formula bar, now ‘Select an image’ should be active and can be set to uploaded image for your icon.

 

If(IsBlank(AddMediaButton1.Media), SampleImage, AddMediaButton1.Media)

 

clip_image004[8]

 

clip_image005[8]

 

Now select AddMediaButton1 and clear Text, Change picture text fields  

 

clip_image006[8]

 

After some manual adjustments of size, the control looks like this.

 

clip_image007[9]

 

4-      Now select AddMediaButton1 and set OnSelect Property

 

Collect(allimages, {Title: "Some Title", Image:Image1.Image})

 

5-      Now select Add Picture control and set Items to allimages

 

clip_image009[9]

 

6-      Now select temporary image and set Image Property to AddMediaButton1.Media value

 

clip_image011[9]

 

Also hide temporary image using Visible=false

 

7-      Now select Gallery control and make sure fields are set correctly.

 

clip_image013[12]

 

8-      And that’s it :-)

 

Quick preview looks like this:

clip_image015[8]

 

After choosing few images from local folder   

   

clip_image017[9]

 

Here is in memory collection with base64 Images

clip_image019[9]

 

In later article I will write about passing this collection of images to PowerApps-flow and store them into SharePoint.

 

 

 

   

   

 

 

 

   

       

 

 

 

 

 

 

Wednesday 26 August 2015

SharePoint 2016 Preview is OUT

The preview is available for download. Bear in mind, this is a trial valid for 180 days and won't allow you to change to RTM later on.

https://blogs.office.com/2015/08/24/announcing-availability-of-sharepoint-server-2016-it-preview-and-cloud-hybrid-search

This link explains in brief the new features that product has to offer. Few buzz words, "Cloud First", "Enhanced User Experience", "Hybrid Search", "Device Friendly", "Less Deployment & Configuration Overheads", "Zero Downtime", "10GB File Support", "App Launcher" etc. etc. 

After downloading the trial, you need to run first prerequisiteinstaller.exe and then setup.exe. 




After installation, the configuration wizard will start and prompt you for database, farm account and then this new screen that will help to minimize deployment overheads in multi server farm environments.  

I used Single Server Farm option.




After configuration wizard, the central administration will prompt for Customer Improvement Program and Farm Configuration



Few more screens including App Launcher option. 
















Hope this helps!








Monday 29 June 2015

Faceted Navigation - SharePoint 2013

Faceted Navigation is great feature in SharePoint 2013 when it comes to providing the complex filtering on search based results. It works with your Managed Terms and provides great flexibility for refining results and even changing refinement panel values based on user selection against individual terms.

There are few articles available on the web which can cover this part in lot more detail and here are few of them.

https://technet.microsoft.com/en-us/library/jj679902.aspx

http://blogs.msdn.com/b/faceted_navigation_in_sharepoint_2013/archive/2012/11/23/10371130.aspx

http://sharepoint.stackexchange.com/questions/114797/issue-while-setting-faceted-search-in-sharepoint-2013

However the purpose of this post is to high light one situation when you are not able to select 'Use the refinement configuration defined in the Managed Navigation term set' option in refinement Panel. IT'S DISABLED


Your term store is correctly configuration using Use this Term Set for Faceted Navigation against term set and Faceted Navigation tab is having right values against terms, then there is just one step missing and that is to configure your site navigation to use Managed Navigation instead of structural.




Quite obvious when you read the option once again ;-)...

Hope this helps!

Wednesday 29 January 2014

SQL Server 2012 Reporting Services Integration with SharePoint 2013

Sorry, something went wrong
An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. ---> System.Exception: For more information about this error navigate to the report server on the local server machine, or enable remote errors

Broken Areas of SSRS in SharePoint 2013:



Reporting Services caching, subscriptions are broken. When try using this option it says above error message.
  • ·        Manage Processing Options
  • ·        Manage Cache Refresh Plans

Resolution:

Method - 1 (recommended)

Select 'SQL Reporting Services Service Application' from Manage service applications page, under Central Administration.

Click 'Provision Subscriptions and Alerts'

Click 'Download Script'

Run these scripts on SQL Server. 

Method - 2 (manual)

First you need to verify ‘SQL Service’, ‘SQL Agent Service’ services account are added to RSExecRole role on Reporting Service, Reporting Services Temp, master, msdb databases.
Secondly and foremost, SQL Reporting Services Service Application Pool account is also added in RSExecRole. For instance, when user clicks ‘Manage Processing Options’ from report properties, behind the scene database connection is made using ‘Integrated Security = true’.

Hope this helps!


Majid

Saturday 21 December 2013

AppFabric 1.1 un-installation crises , Broken App Catalog Creation - SharePoint 2013

Recently whilst setting up Workflow Manager for SharePoint 2013, I accidentally removed AppFabric 1.1 from application server. This application server was also hosting CA and few Service Applications. Nothing got affected immediately but as soon as I tried to configure Apps Catalog Site Collection I was presented with popular message i.e. "Sorry, something went wrong..."

After checking ULS, I found these two culprits and after jogging my memories I realized that this may be happening due to AppFabric un-installation.


w3wp.exe (0x1384)   0x1378 SharePoint Foundation         Upgrade                       ajywy Unexpected w3wp (0x1384) 0x1378 SharePoint Foundation Upgrade SPSiteWssSequence ajywy ERROR Failed to call GetTypes() 232d629c-7667-9002-c266-7e335d287cf6 232d629c-7667-9002-c266-7e335d287cf6

w3wp.exe (0x1384)                       0x1378 SharePoint Foundation         Upgrade                       ajywy Unexpected w3wp (0x1384) 0x1378 SharePoint Foundation Upgrade SPSiteWssSequence ajywy ERROR Exception: Could not load file or assembly 'Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. 232d629c-7667-9002-c266-7e335d287cf6 232d629c-7667-9002-c266-7e335d287cf6

After installing AppFabric 1.1 from below link resolved my issue.


Moreover, during AppFabric installation if you run into issues then this could be due to missing environment variable i.e - PSModulePath. As behind the scene, msi tries to fire some powershell scripts which fail to run in result of this missing variable. 

You will need to dig into msi log files in order to find what exactly causing this. All the best!


http://stackoverflow.com/questions/11205927/appfabric-installation-failed-because-installer-msi-returned-with-error-code-1

After installing AppFabric if it still doesn't work then drag and drop dlls from this location to GAC

C:\Program Files\AppFabric 1.1 for Windows Server

Crises over! 

Monday 2 December 2013

SharePoint 2010 SSRS Reports in SQL 2012, Migration Case

If your company migrated from SQL Server Reporting Services 2008 to SQL Server Reporting Services 2012 then reports migration will require additional steps of configuration in order to run reports built in previous version successfully.

Note:  Below migration case is Old SharePoint 2010 Farm to New SharePoint 2010 Farm.
  1. After deploying and Integrating SQL Server Reporting Services 2012 with SharePoint 2010
    1. Make safe control entries as per this link. http://social.msdn.microsoft.com/Forums/sqlserver/en-US/90db82a2-3eef-469b-8dce-ca148820a75c/sqlserver-2012-upgrade-breaks-ssrs-reportviewerwebpart?forum=sqlreportingservices This is to support reports built and deployed in previous version of SSRS i.e. SQL Server Reporting Services 2008
    2.  Switch on Enable Remote Error options in Service Application as well as in Site Settings. This will show under lying error message while running reports. Further debugging is possible this way. http://msdn.microsoft.com/en-us/library/aa337165.aspx 
  2. After Farm migration, use the following steps to re-configure reports
    1. Change Data Connection Settings, enter new database settings, user name, password and enable it by checking Availability check box at the bottom.
    2.  After migrating reports and their datasets to new Farm, the link between shared data source and report is broken(reason unknown yet). This needs correcting manually by going in each report and changing data source settings as per screen below.
Hope this will help!


Thursday 2 August 2012

Set BCS Throttle Limits SharePoint 2010

You can set various types of BCS Throttle limits using this powershell snippet :-)


$bdcAppProxy = Get-SPServiceApplicationProxy | Where {$_ -match "Business Data Connectivity"}

$throttleDb = Get-SPBusinessDataCatalogThrottleConfig -Scope Database -ThrottleType Items -ServiceApplicationProxy $bdcAppProxy

Set-SPBusinessDataCatalogThrottleConfig -Identity $throttleDb -maximum 120000 -default 100000

$throttleWCF = Get-SPBusinessDataCatalogThrottleConfig -Scope WCF -ThrottleType Size -ServiceApplicationProxy $bdcAppProxy

Set-SPBusinessDataCatalogThrottleConfig -Identity $throttleWCF -maximum 1000000 -default 5000000 

$throttleConn = Get-SPBusinessDataCatalogThrottleConfig -Scope Global -ThrottleType Connections -ServiceApplicationProxy $bdcAppProxy Set-SPBusinessDataCatalogThrottleConfig -Identity

$throttleConn -maximum 200 -default 150

Iconise ‘Add Picture’ control in PowerApps

Default look you get for ‘Add Picture’ control is not very appealing for end user and there is no OTB way of specifying icon for this con...