Repeating tables and filters - InfoPath Dev
in

InfoPath Dev

Repeating tables and filters

Last post 02-21-2013 08:08 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-20-2013 08:23 AM

    Repeating tables and filters

    Hi knowledgable people

    I have inserted a repeating table to a form which has a filter on the first control (meal) to a SharePoint list depending on one of the options selected in a drop-down control - this works fine. The second control (cost) in the table then has a filter the same as but looks at a different column in the list depending on the first option (meal) in the table.

    The issue arises when adding a new row that the 'cost' automatically populates according to what is in the first row, not to what is selected in the first column (meal).

    I am assuming I have something not set correctly but don't know whether that's in the filter or the table.

    Any words of wisdom would be most useful.

    Thanks

    Karen

    Filed under: ,
  • 02-20-2013 09:13 AM In reply to

    Re: Repeating tables and filters

    Hi,

    You need to use the current() function to tell your cost field that it wants the meal field on the current row.

    Your cost field's default value would be something like:

    xdXDocument:GetDOM("MySharePointList")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Cost[../d:Meal = current()/../my:meal]

    Give it a shot and let me know your results.

    Cheers!

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

  • 02-21-2013 01:12 AM In reply to

    Re: Repeating tables and filters

    Hi

    Thanks so much for your reply.

    It makes sense in theory but I have no idea how to add the current function in. When I look through the function list there isn't 'current' and I don't know any other way of adding a function. What you have typed out looks very clever and beyond my knowledge.

    Thanks, I really appreciate your help.

  • 02-21-2013 01:29 AM In reply to

    Re: Repeating tables and filters

    Hi again

    I managed to find the technical bit and it shows as xdXDocument:GetDOM("Menu Choices")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Price[../d:Title = xdXDocument:get-DOM()/my:myFields/my:group3/my:group4/my:Item]

    Can you advise on where I need to put the current function as I keep getting errors when I try.

    Thanks again

  • 02-21-2013 08:08 AM In reply to

    Re: Repeating tables and filters

    Which is your repeating group? What field is the rule on?
    Hilary Stoupa

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