Posts

Showing posts from 2014

How to show specific views depending on the current user group in a SharePoint list

There is a way to show and redirect users to specific views depending on their group, by modifying the "AllItems.aspx" page. Firstly, create  library within your site called JqueryLibraries and put there the  jquery-1.9.0.js and the  jquery.SPServices-0.7.2.js libraries. You can download the  jquery.SPServices-0.7.2.js  from here: http://spservices.codeplex.com/releases/view/81401  (unzip the file and use the .js version) You can download the  jquery-1.9.0.js  from here: http://code.google.com/p/google-caja/source/browse/trunk/third_party/precajole/jquery/1.9.0/?r=5248 Create the views where you want the user to be redirected (i.e: Your1View.aspx and Your2View.aspx). Make a security copy of the "AllItems.aspx" page, delete everything in the original page and paste the following: <%@ Page Language="C#" %> <html dir="ltr"> <script language="javascript" src="/ SiteName / JqueryLibraries /jquery-1.9.0.js

How to add language localization to your info path web browser form 2010/2013

Image
Sometimes your form needs to be available in different languages. This solution provides you with an "easy" way to change the language of  drop down lists, buttons, labels and screen-tips depending on the selected language through a XML file and some rules. The following example shows how to to do all of this in 3 languages (English, Spanish and Basque) : The following steps will show you how to set up the drop down list that will change between the languages: C reate a XML file using the following format: <?xml version="1.0" encoding="UTF-8"?> <LocalSettings>     <Languages>         <Language Name="English" Code="ENG"/>         <Language Name="EspaƱol" Code="SPA"/>         <Language Name="Euskara" Code="EUS"/>         </Languages>     <Labels>           <Label Name="Personal Data">             <LocalL

Getting the group Name of the current user in Info path forms

Image
Sometimes, it is useful to get the group name of the current user in order to create rules based on that group, i.e: if we want to manage the permissions within the form through views depending on groups. The following example shows how to get the group name of the current user .  I have divided the steps in 4 main sections: Creating a web service connection :  New web service connection need to be created to obtain the group name thought the  GetGroupCollectionFormUser  service. Exporting the form:   The form needs to be exported as we will apply some changes in one of the exported files. Updating the XSD file : Edit the GetGroupCollectionFormUser1.xsd file. Creating rules to manage the permissions within the form : The form permissions will be managed through rules created in the Form Load. Users will see different form views depending on the groups they belong to. Creating a web service connection: Manage Data Connections -> Add -> Receive Data -> SOAP

How to access repeating table/section fields in Info Path Web Browser Forms

Accessing or validating fields within a repeating table/section using web  browser forms might be a little bit tricky, as web browser forms will not allow you to reference specific rows by index, use Last() or Position() functions... There are some XPath formulas that you can use to access or validate fields within a repeating section with out having to use any extra code in your form. These are some examples: Check if a repeating section/table has duplicate rows: count( XpathToRepeatingGroup [following-sibling::*/ FieldToBevalidated = FieldToBeValidated ]) > 0 If value returned by the XPath expression is greater than 0 then the repeating table contains duplicate rows. The number returned by the XPath expression will be the number of duplicate rows that your repeating section contains. Do not forget to include in the condition when field is not blank, as blank values count as duplicates. Get the previous row value: ../ preceding-sibling:: my:RepeatingGroup [count(precedin