get value from specific or dynamic row of repeating table - InfoPath Dev
in

InfoPath Dev

get value from specific or dynamic row of repeating table

Last post 08-18-2013 04:55 PM by Patrick Halstead. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 05-09-2011 08:01 AM

    get value from specific or dynamic row of repeating table

    I have an IP07, script vb. One of my fields is a option field with 9 options. Based on a selection of this fields I need to populate a specific funding source. I am almost there, but feel I am using too many fields to acomplish this. I have a number field that returns a number value base on user selection of the option field.

    Then I have a repeating table (2 columns) with my populated funding sources (col row number, col 2 details). Currently I can hide all the rows except for the one that equals the selected option.

    Now I need to figure out a way to get this visible value to a text field. There is a posibility that somewhere along the life cycle that value may change, user input will need to override. I have been trying to figure out how I can get the col value for a specific row in the table using the number I populate from the option selection.

    Or how can I make the textbox equal to the visible item of the repeating table?

    Kind regards,
    Larry
  • 05-12-2011 07:56 AM In reply to

    Re: get value from specific or dynamic row of repeating table

    Hi:

    The text field you want to set -- it is not in the repeating section, correct? Does it have to be a field (just checking -- if all you need to do is display the value, I'd use an expression box, since I already have the data in the form) - is your repeating table in your main data source or a secondary data source?

    At any rate, you should be able to use a rule on the field that you are calling a "number field" -- I get a bit confused reading the description, but it sounds as if that is the field that determines which row of the table you are showing.

    The rule on the number field should set the value of the text field to the desired field from the data source for the repeating table. Add a filter when you select that field -- the filter would be just like the one on your repeating table.

    Post a sample of your form to a reply if you need more help with this (under the Options tab)

    Hilary Stoupa

  • 05-12-2011 10:36 AM In reply to

    Re: get value from specific or dynamic row of repeating table

    Hilary, thanks for taking the time. I know my post got confusing, but I think you understood. I have copied my .xsn file for review. on the default view is where I am currently working. The field "Maintenance Categorisation" is a radio select. Below this is a repeating table with 9 default values, one for each option of the "Maintenance Categorisation". When you review the template you will see I am able to display the correct value in the repeating table, but what I need to do is post that value. This is the reason I was trying to get a text field to populate with the visible row. Actually it doesn't matter how I promote this value, as long as it can be seen and edited, if user chooses to make a change. I am not sure how this form will act because of my data connection, but I have been able to work off line with it several time to test functionality.
    Kind regards,
    Larry
  • 05-12-2011 11:03 AM In reply to

    Re: get value from specific or dynamic row of repeating table

    I've added two attributes to your Maintenance Categorisation field. One has a default that makes use of your FSNum field, one just uses the formula you used for that field. Take a look and see if I've understood what you are trying to do....
    Hilary Stoupa

  • 05-12-2011 12:10 PM In reply to

    Re: get value from specific or dynamic row of repeating table

    You rock!

    thanks a million.

    Kind regards,
    Larry
  • 08-14-2013 05:30 PM In reply to

    • ycyusa
    • Not Ranked
    • Joined on 08-14-2013
    • Posts 1

    Re: get value from specific or dynamic row of repeating table

    Hi Hilary, I have one question which I only can get the first row data from a repeating table. I know you may answer this question in many times. I read some articles and posts but I still cannot figure it out. Group28 group29 (repeating table) field1 With this one => eval(eval(group29, 'concat(../my:group29/field1, ";")'), ".."), I got => first row data; first row data I tried to change => eval(eval(../my:group28/group29, 'concat(../my:group28/my:group29/field1,";")'),"..) Error message: Reference to undeclared namespace prefix: 'my' Can you please help me?
  • 08-18-2013 04:55 PM In reply to

    Re: get value from specific or dynamic row of repeating table

    Looks like your field1 needs a "my:" prefix. Or, the other "my:" prefixes need to be removed.

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.