InfoPath repeating table with calculated field problem
-
Friday, May 11, 2012 4:58 PM
I have two fields in a repeating table.
Field B returns a lookup value from a data connection based on the value selected in Field A.
The formula works fine when only adding one row to the repeating table.
However, when a second row is added (or third, etc), the Field B value changes for both rows based on the value selected in Field A of the second row.
This is what I have in as the formula for Field B:
Any help will be very appreciated.
All Replies
-
Monday, May 14, 2012 7:56 AMModerator
Hi robertthoms,
Please make sure the Field B is also added under the repeating group. Then change your formula
Date_x0020_Approved[SolutionChild = Record_x0020_Number] to
Date_x0020_Approved[SolutionChild = current()/../Record_x0020_Number]
And test it again.
Thanks & Regards,
Emir
Emir Liu
TechNet Community Support
- Edited by Emir LiuMicrosoft Contingent Staff, Moderator Monday, May 14, 2012 7:56 AM
- Marked As Answer by Emir LiuMicrosoft Contingent Staff, Moderator Monday, May 21, 2012 3:22 AM
-
Tuesday, May 15, 2012 1:57 PMThank you Emir. However, I don't have the current() function. Do you know how i can get it?
-
Wednesday, May 16, 2012 2:21 AMModerator
Hi robertthoms,
current() is a field function which returns the current field or group in a repeating context. Here we use the current() to refer to a current row in a repeating table. So current()/../Record_x0020_Number means the value selected in Record_Numer field in current row.
To better understanding current() function, please see
http://blogs.msdn.com/b/infopath/archive/2004/09/13/228881.aspxAnd find more InfoPath functions, please go to
http://office.microsoft.com/en-us/infopath-help/functions-in-infopath-HP001155281.aspxThanks & Regards,
EmirEmir Liu
TechNet Community Support
-
Wednesday, May 16, 2012 6:35 PM
I was able to get the current() function, but now i am getting this error message...
-
Thursday, May 17, 2012 2:45 AMModerator
-
Wednesday, August 01, 2012 6:06 PM
Hi Emir,
i am using the expression "ns2:title = current()//my:Field2" where Field2 is also in repeating section. ns2:title is the title field of data fields of share point list data connection.
this is working fine in preview. however throwing "object reference not set to an instance error" on site.
i also tried giving oob condition i.e., "ns2:title = current()/my:Field2" with this also, i am getting same error msg as above.
your help is highly appreciated.
thanks
Thanks & Regards Raj

