Input Parameters - InfoPath Dev
in

InfoPath Dev

Input Parameters

Last post 09-10-2010 07:48 AM by RSharepoint. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-09-2010 08:16 AM

    Input Parameters

    Hi all,

       I have a browser enabled infopath form template. I am opening the template from a content editor webpart  in moss 2007. When opened from a new button , I want the form to be opened in the default view.When i open the same form from search button..I want to hide some controls on the same default view.I am trying to use input parameters but does'nt seem to work.Please Help!!

     Thanks in advance!

      

  • 09-10-2010 04:46 AM In reply to

    If I understand the scenario correctly, you shouldn't need to switch views nor use input parameters. You can do everything in one view, and just hide sections using conditional formatting.

    Usually all forms have values that are set on the first submit, for example, SubmittedDate or Status. You could have sections that hide/show depending on whether a field has a value or is blank (because, for a new form, most fielda might be blank).

    Does that make sense?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 09-10-2010 07:48 AM In reply to

    Hi ErnestoM

    Thank You very much for the response.But let me explain my scenario in a better way .I have a tab control created with 7 tabs ..each tab as each view and the tabs are nothing but buttons.Basically when I open my form from the search button, I open the search tab or view and I want to hide all other tabs .And when I open the form from the New butoon I am opening the same view with all Tabs(All Views) visible.

    As you said in both the scenario the fields are blank. what I did was created a input parameter in the form load:

     try
                {
                    if (e.InputParameters.Keys.Contains("sview"))
                    {
                        string s = e.InputParameters["sview"].ToString();
                        MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:SwitchViews", NamespaceManager).SetValue(s);

                     }

                 }

    catch (Exception ex)
               {
                    MessageBox.Show(ex.Message);
               }  

    Then I have a SwitchViews boolean field created in the maindatasource which has false as default value.I have applied conditional formating on all the tabs/buttons..if switchviews = true then hide the tabs.And then trying to open the form with the parameter passed.I dont know if this is the right way to do it or am I missing something. Please advice. 

    Thank You!!!

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.