filtering concatinated textbox generated from a repeating table - InfoPath Dev
in

InfoPath Dev

filtering concatinated textbox generated from a repeating table

Last post 08-18-2010 07:56 AM by texastwo. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-04-2010 05:39 PM

    filtering concatinated textbox generated from a repeating table

    I “think” I'm dealing with apples and oranges here, or the old Texas saying may apply "it’s hard to make chicken salad out of chicken dodo".(A) http://www.infopathdev.com/forums/p/7124/30263.aspx#30263 makes reference to: xdMath:Eval(xdMath:Eval(../my:Group/my:RepeatingGroup, 'substring(concat(my:Value, ";"), 1, (my:Select = string(true())) * string-length(concat(my:Value, ";")))'), "..") this works well for repeating tables bound to "main".(B) http://www.infopathdev.com/forums/p/15704/56192.aspx#56192 makes reference to:  substring(xdMath:Eval(xdMath:Eval(../../dfs:Inventory_Master_List[@IOR = "yes"], 'concat(", ", @ID)'), ".."), 2)  and this works very well for secondary repeating tables.I’ve hit the wall on what I believe to be my short knowlege of the syntax for main and secondary repeating tables. "B" works very well for most of my needs however by design, everything in the List populates my concatenated textbox when the SharePoint list equals Yes in the @IOR column. I have found no way to filter the statement similar to "A".To accommodate and add a filtering agent, I have changed my methodology to force the user community to save the form after some minimal required information. When this form is submitted, it sets the @FormID field and adds it to a calendar. This allows me to gather the submitted form’s @FormID and apply it towards the filtering element of the "B" expression. The goal is something like: If my repeating table has Secdata @IOR equaling Yes, I add the @ID to my text box. But the only results I want to see in the textbox are the ones that have @IOR equaling Yes and if the @FormID= FormID. Or specifically, only the Secdata @IOR equaling Yes that was added to the sharepoint list from the respective form (@FormID).

    substring(xdMath:Eval(xdMath:Eval(../../dfs:Secdata [@IOR = "yes"], 'concat(", ", @ID)'), ".."), 2) (../../dfs:Secdata[@FormID = my:FormID]) * string-length(concat(my:FormID, ";")))'), "..").

     

  • 07-12-2010 07:32 AM In reply to

    Re: filtering concatinated textbox generated from a repeating table

    You seem to be making this more complicated than it needs to be.  How about this?:

    substring(xdMath:Eval(xdMath:Eval(../../dfs:Secdata [@IOR = "yes"][@FormID = my:FormID], 'concat(", ", @ID)'), ".."), 2) 

    You should use the Insert Field... dialog to select the my:FormID field from your main data source, because just typing my:FormID there won't work.

     

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-29-2010 11:47 AM In reply to

    Re: filtering concatinated textbox generated from a repeating table

    expression="substring(xdMath:Eval(xdMath:Eval(../../dfs:Secdata[@select="2"][@EID =" xdXDocument:get-DOM()/my:myFields/my:Constants/my:EID" ], 'concat(", ", @ID)'), ".."), 2)"

    Not having much success joining the second bracket. I've tried just about every combination.... even = my:EID

  • 08-17-2010 08:25 AM In reply to

    Re: filtering concatinated textbox generated from a repeating table

    I guess I don't understanding the syntax! From the manifest file, when I'm dealing with secondary and main data sources, what is the syntax for main in the bracketed formula. [@EID = "/my:myFields/my:Summary/my:testfld"]

    I created test field and copied it verbatium from the manifest, thats not working and the simple "my:testfld" appears to not work as well. I want to filter my secondary data, and only use the secondary data that matches my main testfld value?

    Any thoughts?

    Current expression from manifest...   "substring(xdMath:Eval(xdMath:Eval(../../dfs:secdata[@EID = "/my:myFields/my:Summary/my:testfld"], 'concat(", ", @ID)'), ".."), 2)">

     

  • 08-17-2010 08:50 AM In reply to

    Re: filtering concatinated textbox generated from a repeating table

    It should be  xdXDocument:get-DOM()/my:myFields/my:Constants/my:EID, without quotes around it.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 08-18-2010 07:56 AM In reply to

    Re: filtering concatinated textbox generated from a repeating table

    Apparently, I need to take a different tack on the path to resolving this.

    The @select ="2" approach is very robust. The problem is I can't filter the results and I receive everything in the column. That is why I introduced the @EID as a filtering agent. @EID was a decimal value, but I made it a string and forced a value into it like "161" using the same approach as offered by @select ="2"  . No results. But I can see the value in SP list. (both @Select and @EID are in the same SP list.)  Last attempt: expression="substring(xdMath:Eval(xdMath:Eval(../../dfs:SecData[@Select="2"][@EID="161"], 'concat(", ", @ID)'), ".."), 2)"

    Do you have suggestions on using the double eval, or another method within the form to compare my secondary data column, @EID and only show results that match the comma delimited string created by @select="2" that match my:forms EID= @EID. I looked at the webservice for getlist, but I'm not farmiliar with VB coding, and trying to remain with just inopath and sharepoint as my basic tools.

    Thanks for your time, and expertise!


     

     

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