Simple Code to Add Row - InfoPath Dev
in

InfoPath Dev

Simple Code to Add Row

Last post 08-21-2017 04:04 PM by Hilary Stoupa. 24 replies.
Page 2 of 2 (25 items) < Previous 1 2
Sort Posts: Previous Next
  • 12-08-2010 11:49 PM In reply to

    • PJagger
    • Top 500 Contributor
      Male
    • Joined on 11-20-2007
    • Australia
    • Posts 40

    Anybody?

  • 12-09-2010 06:24 AM In reply to

    1. Download qRules v2.3 (free trial)
    2. Use InsertRow command rule

    No code required. Piece of cake.

    Patrick Halstead
    Project Manager at Qdabra
  • 12-09-2010 02:10 PM In reply to

    • PJagger
    • Top 500 Contributor
      Male
    • Joined on 11-20-2007
    • Australia
    • Posts 40

    Whilst I appreciate being made aware of helpful software (at a price) which bypasses the need for code, one would have to question the ethics of a forum which is reduced to a software advertising platform.  Maybe a column on the right showing sponsored links or a reply (amongst helpful code examples) with a link (for my information etc.) to the software would be more appropriate.

    In the past when I posted questions to this forum, people were generous with help, Oh how this forum has changed.  Do forum overseers still exist or have they gone too?

     Phil

  • 12-09-2010 07:52 PM In reply to

    Hi PJagger,

    We have code on this site that answers your question and we should do a better job of making it easy to find. Currently you have to use Search and wade through articles until you find it. There's a good Google search of our site that is slightly better than our search: http://www.google.com/cse/home?cx=003654972516704994317%3A4j0mji2l1rq 

    Here are the results for Insert Row: http://www.google.com/cse?cx=003654972516704994317%3A4j0mji2l1rq&ie=UTF-8&q=Insert+Row&siteurl=www.google.com%2Fcse%2Fhome%3Fcx%3D003654972516704994317%253A4j0mji2l1rq

    We have been referring people to qRules not because we make money off of it - the price basically covers support time. It's a huge value add to people and it saves them money. If the thing was profitable (which it isn't), I would agree with you but our goal isn't to make a huge profit. We are artisanal form design consultants. We focus on the craft of good forms design, not on making truckloads of money and growing. qRules is good for you because it is a best practice to use a library of code and rules and it also saves you time because you don't have to have a developer to add it to your forms. Plus it contains ~50 of the most commonly requested things that require code. It's a huge timesaver and has lots of uses. That's good for you and saves us time replying to every coding request. We have replied to coding requests in the past and we will continue to do so for new topics. We also encourage others to. We guarantee a 90% response rate in this forum (unlike MSDN). For topics that have been thoroughly posted, we will work on a better way to find them in Q1 of next year

    We will always be small but we will continue to create great tools for the Web that save people time and money.

    So, no ethical quandary to speak of... :)  but thanks for the poke. I appreciate your thoughts.

    Patrick Halstead
    Project Manager at Qdabra
  • 12-09-2010 08:01 PM In reply to

    Hi PJagger,

    We do have a  blog post on this: Programmatically adding rows to repeating sections - I think this is what you need.

    Hope it helps!


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

  • 12-10-2010 05:38 AM In reply to

    • PJagger
    • Top 500 Contributor
      Male
    • Joined on 11-20-2007
    • Australia
    • Posts 40

    Hi Mel,

    Thanks for your response, however, my post asking for help on that issue was resolved in line with your url pointing me to the blog.  My recent post (a little further down the list) included the following:

    May I impose a little further?

    Now that I am driving Infopath 2010 and have switched from Java Script to Visual Basic, I feel like I am learning everything from scratch.

    • Firstly, I need the equivalent of the following in VB (Infopath 2007 compatible):

    XDocument.UI.Alert("BlaBlaBla")
    Note: I have not been able to call 'XDocument' at all, as it is not defined.  (I don't recall defining it in JScript). 

    • Secondly, when using the print() command, is there a method to print a specific view?
    • Thirdly, I have a form connection called 'submit' to submit the form to a sharepoint library.  Given that I have not been able to test the form on line yet, is the following method correct?...

    Me.DataConnections("Submit").Execute()

    • Finally, would I be better off using C# rather than VB?

    I have not received any help on this post yet, and it was to this post (as well as my initial post) that Patrick responded with a cart blanche "Download qRules v2.3 (free trial)" of which I may well do but it is not a very satisfactory reply to my post.  I would appreciate any help on the queries above.

    Regards Phil

  • 12-10-2010 06:39 AM In reply to

    1.  In the 2007 OM, the standard Windows Forms method MessageBox.Show() is used for showing message boxes.

    2.  Not that I know of.  You might be able to temporarily switch to the view you want to print, print it, and then switch back before the method returns.

    3.  Yes, that looks right.

    4. C# seems to be the more popular language and seems to be getting more attention from Microsoft as well, and you may find more code examples in C#, but it is relatively easy to convert between them and neither has any more functionality than the other.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 08-21-2017 02:01 PM In reply to

     Should CurrentView.ExecuteAction(ActionType.XCollectionInsert, "group2_1"); on an Infopath 2013 form... I get

     Error    5    'Microsoft.Office.InfoPath.View' does not contain a definition for 'ExecuteAction' and no extension method 'ExecuteAction' accepting a first argument of type 'Microsoft.Office.InfoPath.View' could be found (are you missing a using directive or an assembly reference?)    C:\Users\dmurphy_mgr\AppData\Local\Temp\3\Vsta\InfoPath\VstajMzLidkwtk2Ai4MExGEa_w\Vstaw37i__CioCUKJVizRxKac2w\FormCode.cs    11849    29    PWScatalog2013-03-26

     I have a user that deleted all the rows of a repeating table.  There is now no control to insert a new row and I was looking to give them a button to add an initial row to the repeating table.

  • 08-21-2017 02:04 PM In reply to

     Crud. This doesn't work with browser forms does it.

  • 08-21-2017 04:04 PM In reply to

    Right - you need something more like this: http://www.bizsupportonline.net/infopath2007/4-way-programmatically-add-row-repeating-table.htm
    Hilary Stoupa

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