Thursday 12 January 2017

How to create Collapse and Expand section in InfoPath



  • Create an InfoPath form as shown below.
  • Add a section to this form.

  • Add two buttons ( Expand & Collapse symbols). 

  • Now create a column ( Flag) of Boolean type. It will have value 0 or 1. Set default value as "1".
  • Write the rules on two buttons ( Expand & Collapse) for setting the values of flag column. On "Expand(+)", set value to 1 and on "collapse(-)", set value to 0.

  • And also write rule for display either one at a time. Means if one is button displaying another should be hidden.

  • On "Expand(+)", set flag to 1 and on "collapse(-)", set flag to 0.

  • Finally for the section to collapse or expand, write an action on the section. If Flag = 0, hide the section.



Wednesday 11 January 2017

Authentication in SharePoint


There are 2 types of authentication  in SharePoint.

     1. User Authentication
     2. App Authentication

Click here to get the high level understanding on authentication & authorization.

User Authentication can be done in 3 ways.

  •  Windows Based Authentication 
  •   Form Based Authentication
  •   Token Based Authentication.
Click here to get details on user authentication. 

App Authentication can be done using OAuth.

Details on OAuth.

 Click here to get basics of OAuth  - 1

Click here to get basics of OAuth  - 2

Click here to get basics of OAuth  - 3






Wednesday 4 January 2017

How to redirect to home page after submitting/closing InfoPath form:

     
  Ø     Go to the list and click on add new item.
  Ø    After the form appears, copy the URL.

Example:
http://ABCD1234:1234/sites/MY_SITE/Lists/MY_LIST/Item/newifs.aspx?List=5c408_TEST237464fa%2D4571%2D8ccb%2D782f9DHFD779D&Source=http_TEST%3A%2F%2FABCD1234:1234%3A2407%2Fsites%MY_SITE%2FLists%2FMY_LIST%2FAllItems%2Easpx&RootFolder=& Web=1c43f31645642%2_TESTD1004%2D671c7%2D96c0%2D5c62515af56785

http:// SERVER NAME /sites/ SITE NAME /Lists/LIST NAME /Item/newifs.aspx?List=LIST ID &Source=WRITE THE URL WHERE YOU WANT TO REDIRECT AFTER SUBMIT/CLOSE &RootFolder=&Web=WEB ID

  Ø  Suppose you have a button or anchor tag in home page as mentioned below, on click of which it is opening the InfoPath form.

Example:
<button type="button" onclick="location.href = #" class="btn_class" style="padding: 19px 75px; border: medium none currentcolor; text-align: center; color: white; font-size: 17px; text-decoration: none; margin-top: -8px; margin-left: 310px; display: inline-block; cursor: pointer; background-color: #002966;"> Click Me !!! </button>
Or
<a href=" # ">Click me</a>

  Ø    Go to edit page and Open the button content by clicking on “Edit Source”.
  Ø    In the above two examples replace the “#” with the URL mentioned above.
  Ø    Save the page.
  Ø    Note: Careful while coping the new form url. Only edit that portion of the url where it mentioned “WRITE THE URL WHERE YOU WANT TO REDIRECT AFTER SUBMIT/CLOSE.” It is not required to change the other portions. Means only source link (Source=) needs to be changed.