Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / May 2006

Tip: Looking for answers? Try searching our database.

Infopath and using the current function in a repeating field problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick - 03 May 2006 19:24 GMT
All,
I need some help.  I am having a hard time unstanding the usage of the
current function.  Basically I am altering the Purchase order template
from Microsoft to suit my needs.  The problem I am coming across is how
to correctly use the current function.  If you check out the infopath
Purchase order template you will see a repeating section with the field
part number in the repeating section.  Basically I want the field
description to auto fill in the part number. I can get it to populate
but obviously only the first table of the repeating field is filled out
properly, and that value is carried over to every other additional
inserted table.  So my quesiton is how do I use the current function?
My the value from my sql database that the decription in bound to is
called Part_name.  The rule is as seen below with the destination field
on the form as partNumber.  I kept it the same as the template.
@Part_Number[@Part_Name = description]

The XPATH looks like this
xdXDocument:GetDOM("Van
Layout")/dfs:myFields/dfs:dataFields/dfs:van_layout/@Part_Number[../@Part_Name
=
xdXDocument:get-DOM()/po:purchaseOrder/po:order/po:items/po:item/po:description]

Where and how do I use the current function.  I have searched and
seached and none of the examples or posts I have found make much sense.
Any instructors out there?
Raghuram - 04 May 2006 11:11 GMT
Hi Patrick, I think u can accomplish this task without using current function
also, just follow the below given steps

1. Double-click on the part number field
2. In the default-value section of “Text-Box Properties” click the “fx” button
3. In the “insert formula” dialog box click “Insert a Field or Group” and
select “Description” and click “Ok” 3 times to close all the open dialog boxes
4. Now pre-view the form

Hope this will help you

Signature

Raghuram
http://www.autonomysystems.com

> All,
> I need some help.  I am having a hard time unstanding the usage of the
[quoted text clipped - 21 lines]
> seached and none of the examples or posts I have found make much sense.
>  Any instructors out there?
Patrick - 05 May 2006 06:06 GMT
I tried that and it did not work.  I think that it didn't work because
both fields are apart of the same repeating table.  Can you tell me how
to use the current function?
> Hi Patrick, I think u can accomplish this task without using current function
> also, just follow the below given steps
[quoted text clipped - 36 lines]
> > seached and none of the examples or posts I have found make much sense.
> >  Any instructors out there?
Adam Harding - 05 May 2006 15:58 GMT
Patrick

Try the current function in a variety of places AFTER the equals sign like
this

xdXDocument:GetDOM("Van
Layout")/dfs:myFields/dfs:dataFields/dfs:van_layout/@Part_Number[../@Part_Name
= current()/po:description

if that does not work try it at the higher level as below

xdXDocument:GetDOM("Van
Layout")/dfs:myFields/dfs:dataFields/dfs:van_layout/@Part_Number[../@Part_Name
=Current()/po:purchaseOrder/po:order/po:items/po:item/po:description

If that does not work try it the next step down.

=Current()/po:items/po:item/po:description and so on.

Cheers Adam

> I tried that and it did not work.  I think that it didn't work because
> both fields are apart of the same repeating table.  Can you tell me how
[quoted text clipped - 39 lines]
> > > seached and none of the examples or posts I have found make much sense.
> > >  Any instructors out there?
Patrick - 06 May 2006 06:57 GMT
Thanks man. That really helped a lot!!!! One thing different that I had
to do was add current()/../ instead of current()/     And I read that
in another post where somesaid if it doesn't work one way try it the
other way, but it didn't make sense to me because I was so confused
about the current function, but you really helped me with it.  Thanks
again.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.