ads

Showing posts with label InfoPath. Show all posts
Showing posts with label InfoPath. Show all posts

Wednesday, July 9, 2014

Hide/Exclude first row in repeating table

when we use repeating table some time we didn't want to show first entire row
so how we hide this?

Steps:

  a.     On the ribbon go to Data --> on Form Data group select Default Values



b. on dialog box just remove the check box

c. Click Preview

Result




Sunday, March 10, 2013

InfoPath tips and triks

1. Data Connection
when we define  secondary data source
in dialog box there is a check box
"automatically retrieve data when form is opened"
this mean every time the form is opened the query the connection to retrieve the value
and this is  burden on the loading of the form






Recommendation
do not marked the check box
just set new rule in form load dialog box
that make the query option only one time








2.  How set auto number in repeating table?
a. we using the function "count()" - Counts the number of instances of the specified field or group.
 b. put inside this "../preceding-sibling:: "- Selects all siblings before the current node
c. and append the Xpath to field "my:group2/my:Index"
in the Field Index go to properties --> function and set
  this code .
count(../preceding-sibling::my:group2/my:Index) + 1

this is my repeating table fields

this is the result

Sunday, February 10, 2013

How to set background image for infopath form view



  1. Create a sample form

  1. On the ribbon click Page design  then click "properties"

  1. View properties popup will be open

  1. Mark the option "use a background image" and click "Browse"

                   Select background image and click "OK"

Example Result :



Wednesday, August 29, 2012

Infopath complete Nintex WorkFlow task via WS

Stages:

1. Have to create a data connection in the form http:// 'sitename' / _vti_bin / Nintexworkflow / workflow.asmx2. Select the function GetRunningWorkflowTasksForCurrentUserForListItemsRemove the polling check box each time the form is opened since and want to do with rules

3. Have to complete step one and this time choose a function ProcessTaskResponse2
4. Create the following fields on the form:
      A. ItemId
      B. ListName

    

5. Added new rule Action in button Approve
   A. To import the task ID must be provided a list item ID, WS know to return the current user-related task


Set value on created fields
The rule looks like this:


 B. After we have imported the task ID can be completed by the second function call And set field values ​​from the first function to second
Set fields:
outcome = "Approve"
 workflowlistname = task list name
 C. Query connection (function 2)


 6. Update fields (ItemId and ListName  by the  WF when creating item)
 7. The Workflow looks like this:

Monday, August 6, 2012

Publish infopath form with code behind

Steps:



  1. After you create your infopath form
Click File -->Publish SharePoint server

And then you will see this wizard window below to provide your site collection URL
  1. Select  the option Administrator –approver form template


  1. Create a folder on the server and give permissions (for the user that publishes the form)
  2. Provide path for saving the form on the server 

  1. Go to central administration-> general application settings
  2. Under InfoPath form service properties select manage form template
  1. Click on upload form template link
  1. Click browse choose your form template and click Upload


  1. After uploading the template wait until the status(column) changes from installing to Ready
  2. On the item menu select the option activate to the site collection




  1. Choose the relevant web application and click OK

  1. Create a form library  under  the relevant site collection
  2. Go to list settings --> advanced settings -->
Set Allow management of content types?  To Yes
  1. Go back to the list Settings-->Add from existing site content types-->choose the form.
 






Do you like this post?
Buy me a cup of coffe to show your appreciation!

Tuesday, July 31, 2012

InfoPath delete first row in repeating table via code

The problem:

When you add a new row into a repeating table using code the first line remains blank




The solution:

            XPathNavigator domNav = MainDataSource.CreateNavigator();
            XPathNavigator itemNav = domNav.SelectSingleNode(
           "path to reapeting table[1]",
           NamespaceManager);

            // Delete the row
            if (itemNav != null)
                itemNav.DeleteSelf();

     

Do you like this post?
Buy me a cup of coffe to show your appreciation!

Retrieving data from a secondary data source via VSTA

:The problem
How to retrieve data from a secondary data source using code


:The solution
                
           
            XPathNavigator secondNav = DataSources["data source name"].CreateNavigator();
            XPathNodeIterator rows = secondNav.Select("repeating table Xpath", NamespaceManager);

            while (rows.MoveNext())
            {

                string field1= rows.Current.SelectSingleNode("field name", NamespaceManager).Value;

              
             
          }