Set a field in a row in repeating table - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Set a field in a row in repeating table

Last post 01-16-2007 02:51 PM by Greg Collins. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-04-2007 04:42 AM

    Set a field in a row in repeating table

    Greetings,

    While I am in view1 and pushed a button in the same view1, is there a way to set the value of a textbox field in a row in a repeating table in another view (e.g. view2)?

    Your help is greatly appreciated.
  • 01-04-2007 05:03 AM In reply to

    • Aruna
    • Not Ranked
    • Joined on 12-13-2006
    • India
    • Posts 17

    Re: Set a field in a row in repeating table

    Hi kelsawy,

    1.Create a button to switch view.
    2.In the button properties click on Rules button.
    3.Click on Add button in Rules wizard.
    4.Click on Add Action button.
    5.From Action drop down list select "set a fields value".
    6.Click on the xpath right to "Field" and Select the field to which you want to set value.
    7.Click on the xpath rght to "Value" and select the field which you want to set value.

    Hope this helps you!
  • 01-04-2007 04:21 PM In reply to

    Re: Set a field in a row in repeating table

    Keep in mind that your data is entirely independant of any views that you have, and any fields present in any views.

    You can modify any field value in your DOM from any view.
  • 01-06-2007 03:48 AM In reply to

    Re: Set a field in a row in repeating table

    Greetings,

    Thank you Aruna and Greg Collins for your reply. I know all of what you have said and tried it before. The method you have mentioned will set ALL the values of the field in ALL rows in the repeating table.

    The problem is that there is no way to select the xpath of a certain field in a certain row of the repeating table. The only selection for the xpath of the field to be set, is to provide the xpath for the field (with no row) in the repeating table.

    I hope there is a simple way in InfoPath 2003 (with SP1) without using VB script which I know little about.

    kelsawy
  • 01-08-2007 09:30 AM In reply to

    Re: Set a field in a row in repeating table

    If you know the row number you can filter out just that row in your XPath using the '[n]' filter:

    /Root/Table/Row[3]/Field = "value"

    Sets "value" to Field on the 3rd row of the table.

    If you know a filter value you can use that:

    /Root/Table/Row[FilterField = 'FilterValue']/Field = "value"

    Sets "value" to Field on the table row where FilterField = "FilterValue"

    If you are using rules, and you don't filter for a particular row, then yes, all rows will be updated.
  • 01-13-2007 12:01 AM In reply to

    Re: Set a field in a row in repeating table

    Dear Greg

    Thank you very much for your help. It looks that what you have described needs
    to be done with VB or Java scripts.

    Without scripting and even if I filtered the table for a specific row as you
    proposed, I will not be able to edit xpath (in rules actions) to reach my
    specific field in the specific row.

    When I add a rule, add action within the rule, and select "Set a Field Value",
    I am only restricted to the selection of a field without editing its xpath.
    This would set the value of the field in all rows in the table even after
    using a filter for a particular row.

    If you agree on what I am saying, then I have to use VB script.


    kelsawy
  • 01-16-2007 02:51 PM In reply to

    Re: Set a field in a row in repeating table

    I responded to your other identical posting with this:

    If you want, you can use code to solve the problem. That's the safest way. Otherwise, you can create a rule (the kind that updates all rows), and then manually edit the manifest.xsf file to update the xpath for that rule action to include the filter.
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.