Current() and Data Crossover .... again !! - InfoPath Dev Sign in | Join | Help in General InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » General » Current() and Data Crossover .... again !! Current() and Data Crossover .... again !! Last post 03-12-2012 08:42 AM by Robert Hansen. 14 replies. Page 1 of 1 (15 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 11-30-2009 08:25 AM soulman Joined on 03-10-2008 Posts 15 Current() and Data Crossover .... again !! Reply Contact Firstly allow me to apologise in advance, I know this question has been asked and answered before in other posts, and I have read every single one, but for the life of me i can not get it to work on my form. The issue im talking about is Look-up Fields in a Repeating table, data crossover and utilizing “Current()” PRIMARY DATA SOURCE + myfields+Datafields+ d:RFC_Main + RFC_Main_Software_Releases (Repeating) ID Product_id (Drop_down – queries Products) Product_Ver (Drop_down – queries Product_Version) SECONDARY DATA SOURCES + myfields+Datafields+d:Products Prod_id Prod_Name + myfields+Datafields+Product_Version Ver_id Prod_id Prod_Vernum So the first drop_down “Product_id” queries the “Products” SDS, stores Prod_id but displays Prod_Name The second drop_down “Product_Ver” queries the “Product_Version" SDS and lists all versions related to that Product_id. The expression is as follows :- xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/d:RFC_Main/d:RFC_Main_Software_Releases/@Product_id = ../@Prod_id This works fine for the first row, but as soon as soon as get to the second row it will list the Products ok, but I get the version numbers associated with the previous product code as well. I have attempted to use current() in various locations and swapped the referencing around, but I can not work out where I should be applying it and with what syntax. Any help would be most appreciative as i am at a deadend and need to resolve this to move on with my project. 11-30-2009 08:34 AM In reply to warrtalon Joined on 12-14-2007 Denver, CO Posts 980 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact I didn't think the current() function was available in 2003. If it is, then I wouldn't try to type it manually, but rather build the data filter statement with the GUI, which automatically invokes the current() function, or at least it does in 2007. If you _have_ to write it manually, then check some other threads that show the syntax and try to follow it. You'll need an example that shows the full XPath, though. Clayton Cobb || SharePoint MVP || Clayton's SharePoint MadnessPlanet Technologies || Federal Partner of the Year (2005-2010) || SLG Partner of the Year (2010) 11-30-2009 08:54 AM In reply to soulman Joined on 03-10-2008 Posts 15 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact Looks like the formatting of my post has gone all funny, despite me using the Preview function Unable to use Infopath 2007 as i still have people using Inforpath 2003. The Current() function is used in IP 2003 and there are many posts on the forum stating this problem. You are right though IP 2007 does this automatically. I've checked other threads, looked at various syntax and still can not get it to work .... im desperate !! :( 11-30-2009 10:56 AM In reply to warrtalon Joined on 12-14-2007 Denver, CO Posts 980 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact That last time I participated in a thread on this topic, it was not a function that was usable in 2003 although the function was recognized when resolving it in the function builder. Really should get all users on IP2007 (Office 2007 actually) so as not to be restricted and so that they're not 2 versions behind in Office, but there's probably nothing you can do about that. However, with IP2007, you could use browser forms as long as you have MOSS Enterprise so that it doesn't matter what your users have. Clayton Cobb || SharePoint MVP || Clayton's SharePoint MadnessPlanet Technologies || Federal Partner of the Year (2005-2010) || SLG Partner of the Year (2010) 12-01-2009 02:59 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact Hi -- can you attach a copy of your form to a reply? You can do this under the options tab. You can use current() in rules and in filtering in IP 2003, which is what I gather you are trying to do... filter a drop down list? Hilary Stoupa 12-02-2009 04:12 AM In reply to soulman Joined on 03-10-2008 Posts 15 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact Hi Hilary, thats exactly what i am trying to do, filter a cascading drop down list in a repeating table :) Is it possible for me to send the form direct to you, i think my company would have issues me sharing database structure info to all and sundry. ? 12-03-2009 08:26 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact As I mentioned in my email, try: The expression ../@Prod_id = current()/@Product_id in your filter on your rows... Hilary Stoupa 12-04-2009 01:25 AM In reply to soulman Joined on 03-10-2008 Posts 15 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact What can i say, the lovely Hilary has come to my rescue,...that worked a treat. I was obviously over complicating the whole process, although im still trying to get my head around the whole syntax. I will take your advice and upgrade to IP7, and make use of its functionality. Many thanks again Hilary. 03-06-2012 12:00 PM In reply to Robert Hansen Joined on 09-08-2010 Posts 7 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact Hello, Hilary, With the help of Microsoft Support, I was able to successfully use the current() function in the XPath code in a repeating table. A few years later, I am developing a new form using InfoPath 2007 and SP 2007, but am saving it in InfoPath 2003 format since my users still have InfoPath and SP 2003. As you know, the current() function is now able to be built and used without manual code editing. The field on which I am using the current() function populates properly when I test it on my machine, but will not populate at all for the users who fill out the form. They don't get any error messages - there's just no data pulled into the form from my secondary data source. It seems that way current() is now employed is making it unusable unless all users are also on the 2007 version. Is this your understanding too? Thanks very much, Bob Hansen Filed under: compatability, secondary data source, info Path 2007, Info Path 2003 03-06-2012 12:12 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact Okay - so it has been a long time since I've looked at this, so I am going by memory here (and we know what that can be like). In IP 2003, if I recall correctly, we could use current() - but not in default values. So you had to use rules to set your field's value if the current() function was needed. I think that if you create an IP 2003 compat form in IP 2007, the IP 2003 user would still experience this issue - defaults with current() would not work correctly, but rules would. So - in your scenario - are you having troubles with defaults? Or rules? Hilary Stoupa 03-06-2012 12:50 PM In reply to Robert Hansen Joined on 09-08-2010 Posts 7 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact Thanks a lot for the quick response. We have actually been using current() in the default value, in a repeating table, and have been were able to pull values when a field (account number) matched in both primary and secondary data sources. Now that I am creating my new form in IP 2007, the values are only pulling in for people using IP 2007. Would I be able to send you a copy of the form? It doesn't have a lot of fields on it. I don't know offhand how to attach it to this message. Thanks. 03-06-2012 02:03 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact You can attach it to a reply under the Options tab - I'm not sure how much help I can be as I no longer have IP 2003 installed anywhere. Hilary Stoupa 03-07-2012 07:16 AM In reply to Robert Hansen Joined on 09-08-2010 Posts 7 Re: Current() and Data Crossover .... again !! ABL Equity Sponsor 030712 Forum.xsn Mark as Not AnswerMark as Answer... Reply Contact Thanks a lot, Hilary. Maybe there's something you can see or think of, even if you don't have the older version. I'm attaching a copy of the form here. There are actually 4 fields with this same issue, but the first one occurring in the main datasource is called "PrinBal" (myFields/MainTable/PrinBal). Bob 03-07-2012 08:31 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact Your syntax looks correct, and since it is working in IP 2007, I'd anticipate it is correct. Like I said, my only recollection on issues with current in IP 2003 was the use of it in default values. If this were my form, I'd try setting rules on the AccountNumber field to set these other fields and remove the default values and see if it works for the IP 2003 users. Hilary Stoupa 03-12-2012 08:42 AM In reply to Robert Hansen Joined on 09-08-2010 Posts 7 Re: Current() and Data Crossover .... again !! Mark as Not AnswerMark as Answer... Reply Contact This worked perfectly, in both IP 2003 and 2007.. I can't thank you enough! Bob Page 1 of 1 (15 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
I didn't think the current() function was available in 2003. If it is, then I wouldn't try to type it manually, but rather build the data filter statement with the GUI, which automatically invokes the current() function, or at least it does in 2007. If you _have_ to write it manually, then check some other threads that show the syntax and try to follow it. You'll need an example that shows the full XPath, though.
Looks like the formatting of my post has gone all funny, despite me using the Preview function
Unable to use Infopath 2007 as i still have people using Inforpath 2003. The Current() function is used in IP 2003 and there are many posts on the forum stating this problem. You are right though IP 2007 does this automatically.
I've checked other threads, looked at various syntax and still can not get it to work .... im desperate !! :(
That last time I participated in a thread on this topic, it was not a function that was usable in 2003 although the function was recognized when resolving it in the function builder.
Really should get all users on IP2007 (Office 2007 actually) so as not to be restricted and so that they're not 2 versions behind in Office, but there's probably nothing you can do about that. However, with IP2007, you could use browser forms as long as you have MOSS Enterprise so that it doesn't matter what your users have.
Hi -- can you attach a copy of your form to a reply? You can do this under the options tab. You can use current() in rules and in filtering in IP 2003, which is what I gather you are trying to do... filter a drop down list?
Hi Hilary,
thats exactly what i am trying to do, filter a cascading drop down list in a repeating table :)
Is it possible for me to send the form direct to you, i think my company would have issues me sharing database structure info to all and sundry. ?
As I mentioned in my email, try:
The expression ../@Prod_id = current()/@Product_id
in your filter on your rows...
What can i say, the lovely Hilary has come to my rescue,...that worked a treat.
I was obviously over complicating the whole process, although im still trying to get my head around the whole syntax. I will take your advice and upgrade to IP7, and make use of its functionality.
Many thanks again Hilary.
Hello, Hilary,
With the help of Microsoft Support, I was able to successfully use the current() function in the XPath code in a repeating table. A few years later, I am developing a new form using InfoPath 2007 and SP 2007, but am saving it in InfoPath 2003 format since my users still have InfoPath and SP 2003.
As you know, the current() function is now able to be built and used without manual code editing.
The field on which I am using the current() function populates properly when I test it on my machine, but will not populate at all for the users who fill out the form. They don't get any error messages - there's just no data pulled into the form from my secondary data source.
It seems that way current() is now employed is making it unusable unless all users are also on the 2007 version. Is this your understanding too?
Thanks very much,
Bob Hansen
Okay - so it has been a long time since I've looked at this, so I am going by memory here (and we know what that can be like).
In IP 2003, if I recall correctly, we could use current() - but not in default values. So you had to use rules to set your field's value if the current() function was needed. I think that if you create an IP 2003 compat form in IP 2007, the IP 2003 user would still experience this issue - defaults with current() would not work correctly, but rules would.
So - in your scenario - are you having troubles with defaults? Or rules?
Thanks a lot for the quick response.
We have actually been using current() in the default value, in a repeating table, and have been were able to pull values when a field (account number) matched in both primary and secondary data sources. Now that I am creating my new form in IP 2007, the values are only pulling in for people using IP 2007.
Would I be able to send you a copy of the form? It doesn't have a lot of fields on it. I don't know offhand how to attach it to this message.
Thanks.
You can attach it to a reply under the Options tab - I'm not sure how much help I can be as I no longer have IP 2003 installed anywhere.
Thanks a lot, Hilary. Maybe there's something you can see or think of, even if you don't have the older version. I'm attaching a copy of the form here.
There are actually 4 fields with this same issue, but the first one occurring in the main datasource is called "PrinBal" (myFields/MainTable/PrinBal).
Bob
Your syntax looks correct, and since it is working in IP 2007, I'd anticipate it is correct.
Like I said, my only recollection on issues with current in IP 2003 was the use of it in default values. If this were my form, I'd try setting rules on the AccountNumber field to set these other fields and remove the default values and see if it works for the IP 2003 users.
This worked perfectly, in both IP 2003 and 2007..
I can't thank you enough!