Is there a qRule to delete the first row of a Repeating Table - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Is there a qRule to delete the first row of a Repeating Table

Last post 10-21-2011 09:56 AM by cnorris135. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 10-21-2011 08:30 AM

    Is there a qRule to delete the first row of a Repeating Table

    My first row of my Repeating table is blank.  Is it possible to have this row automatically deleted since it does not have info?

     Chris

  • 10-21-2011 08:35 AM In reply to

    Re: Is there a qRule to delete the first row of a Repeating Table

    A lot depends on what else you have going on in your form. But if you look under Tools / Options / Defaults (IP 2007) or Data / Defaults (IP 2010) you have the option of not including your repeating group when the form opens. Then you will not have that initial blank row.

    EDIT: I should add, if you want to use the delete command, that works too. Delete /xpath=/path/to/group[1]

    Hilary Stoupa

  • 10-21-2011 09:23 AM In reply to

    Re: Is there a qRule to delete the first row of a Repeating Table

    Yes.  I have given much consideration to the Delete command.  I have been combing this site for the user guide on the Delete command.   Haven't found it yet.   It is my assumption that the [1] is to delete the first row and not for the child group number?

    my Xpath all the way to the child is /my:myFields/my:group15/my:UpdateEstimatedDateOfReport/my:group18/my:group19.

    I believe it would be

    Command = Delete /xpath=/my:myFields/my:group15/my:UpdateEstimatedDateOfReport/my:group18/my:group19

    A user updates some fields, which populate this repeating table.  User goes back later and "updates" those fields, I setup a INSERT command to add a row.  works good.    I did get the Delete command to work ........ sort of.......  Just that now it deletes the row previously there which in turn doesnt allow for more than one row. 

    I can't find a guide for the delete other than the User guide which doesnt have much.....

  • 10-21-2011 09:31 AM In reply to

    Re: Is there a qRule to delete the first row of a Repeating Table

    Many of the commands do not have additional documentation outside of the user guide.

    Is group19 your repeating group? The [1] filter selects the first row of a repeating group. I'd assume that without it, Delete would also delete the first instance of the repeating group since the XPath to a repeating group without a filter generally selects the first instance.

    Hilary Stoupa

  • 10-21-2011 09:35 AM In reply to

    Re: Is there a qRule to delete the first row of a Repeating Table

    you beat me to my question.   Yes group 19 is my repeating table.  I was looking at the user guide and it doesnt mention this. 

     

    Command = Delete /xpath=/my:myFields/my:group15/my:UpdateEstimatedDateOfReport/my:group18/my:group19[1]

     didnt work though.....  probably a space issue....

  • 10-21-2011 09:44 AM In reply to

    Re: Is there a qRule to delete the first row of a Repeating Table

    The user guide says:

    xpath: xpath to delete. It can be filtered in the case of a repeating group or field.

    So, the ability to use a filtered XPath is mentioned in the guide.

    Is there a reason that you can't just exclude the row when the form opens by setting the default? Have you tried:

     Delete /xpath=/my:myFields/my:group15/my:UpdateEstimatedDateOfReport/my:group18/my:group19

    Hilary Stoupa

  • 10-21-2011 09:49 AM In reply to

    Re: Is there a qRule to delete the first row of a Repeating Table

    Hello Chris,

    Could you attach a screenshot of your data source, including the group19 group and all its parent groups?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-21-2011 09:56 AM In reply to

    Re: Is there a qRule to delete the first row of a Repeating Table

    PERFECT!!!

    Thank you Hillary.  Have a wonderful weekend!!!

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