Set values in fields of a repeating table - InfoPath Dev
in

InfoPath Dev

Set values in fields of a repeating table

Last post 02-02-2012 09:06 AM by jaxkookie. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 05-05-2008 12:22 AM

    Set values in fields of a repeating table

    Hello everyone,

    I have one questions related to set vaules in a repaeating table:

    I want to set (in a browser enabled form) a repeating table with values. My InfoPath form has a secondary data source as SQL-Server table. Next I have a drop down menu in the form. In order to change the value in the drop down menu, the repeating table must be updated with informations from the SQL Server table.

    Currently I can do this with one field (Rules -> Set value of a field) - how is this possible with a whole repeating table? And, the secondary data source must be filtered before is set to the repeating table.

    Has anyone ideas?
    Thanks!

     

  • 05-05-2008 03:56 PM In reply to

    Re: Set values in fields of a repeating table

    Rules can only populate single values. If you want to do repeating rows of data, you will need to write code to iterate through the table, adding rows as appropriate, and filling in the row field values.

  • 05-07-2008 06:05 AM In reply to

    Re: Set values in fields of a repeating table

    Hey Greg,

    I was hopping that there is a easy way with the InfoPath GUI but now I'am sure - there is no.

     Thanks for your answer. I'am going to write C# code now ;)

    Sebastian.

  • 05-07-2008 04:12 PM In reply to

    Re: Set values in fields of a repeating table

    Yes, it's one place that's really lacking in InfoPath: the ability to elegantly deal with repeating structures via rules. Maybe the next major release...

  • 07-15-2008 07:28 PM In reply to

    Re: Set values in fields of a repeating table

    I am attempting to perform that very task in my code.

    so far I have

               foreach (XPathNavigator category in MainDataSource.CreateNavigator().Select("my:myFields/my:Categories/my:Category",NamespaceManager))
                {
                    foreach (XPathNavigator responsibility in category.Select("my:myFields/my:Responsibilities/my:Responsibility",NamespaceManager))
                    {
                        responsibility.SelectSingleNode("my:IsExpanded").SetValue("true()");
                    }
                }
     

    to expand out a nested node.

    My problem is, I get a System.Security.SecurityException with an error of 'Request Failed' on the first line. I have tried for a few hours now different values for that xpath query, but everything seems to throw a SecurityException.

    I read somewhere that if I have VS2008 installed, then I need to set me assembly in partial trust mode. Does anyone know how to get rid of these ridiculous securityexceptions???
     

  • 07-17-2008 11:13 AM In reply to

    Re: Set values in fields of a repeating table

    Try the following:

     Change the security level on the InfoPath template

    • Go to Tools -> Form Options -> Security and Trust
    • Clear the checkbox “Automatically determine security level(recomended)”
    • Select the radio button “Full trust”

    Hope it works

  • 01-22-2012 10:35 PM In reply to

    Re: Set values in fields of a repeating table

    Hi I have custom infopath form with code behind where i am taking the querystring value and setting that value to dropdown ex: querystring with all savelocation,source in addition that i am paasing projectId and this ProjecId i am getting through InputParameters.TryGetValue and this value i am assigning to dropdown and all these are in repeating table now my question is when i insert an item in repeating table the value is not assigning to dropdown it shows blank i want as many as i select insert item in repeating table that value should get automatically assigned to dropdown Please let me know the way.
  • 02-02-2012 09:06 AM In reply to

    Re: Set values in fields of a repeating table

    You may have to set the value of the field with a rule. Select the repeating section and add an action to set field value when changes. then on each row insert it will add 1 to that value.

    Kind regards,
    Larry
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.