Infopath force population of fields

W

Welchs

I have a form that I am trying to force populate related data fields. It is
not working. The force population fields are listing the first row in the
SharePoint no matter what is selescted in the first field.

In a set of 5 fields, the first field is selected from a drop down list.
(this is populated by SharePoint) Based on this selection, the next 4 fields
should populate with information from SharePoint (same list) related to the
selection.

Example: Johnny is selected, his age, weight, dob, and height should force
populate from the list. They are not.

Can anyone help?
The formula for "Get Related Data" is currently-
condition: Plan_Name=SP_Plan Name
Set a field's value: .=@BCP_Vendor_Name[.=current()]
VIN1=@BCP_Vendor_Name=current()]
xpath is not checked

Thanks, I am in a project crunch.
S.Welch
 
C

Clay Fox

I am guessing it has to do with the current function you are trying to use.
current() can be use to specify an Xpth but not on its own.

Is this within a repeating section? I would think the filters would be fine
without using current.

Are you using a setfield action on the dropdown or using defaults on the
other fields?

Try going to http://www.infopathdev.com and search on current() to get some
examples of how to use it.
 
W

Welchs

Clay,
Thank you for responding. This is not in a repeating section. This is just
a table with fields coming from a SP list.

If I checked the x path box would this work?

I am using setfield in the Get related data rule attached to the drop down
properties.

What filters would be fine without using current ().? Your saying go from
this:

Set a field's value: .=@BCP_Vendor_Name[.=current()]
VIN1=@BCP_Vendor_Name=current()]

To This:
Set a field's value: .=@BCP_Vendor_Name
Thanks,
Stacie
Clay Fox said:
I am guessing it has to do with the current function you are trying to use.
current() can be use to specify an Xpth but not on its own.

Is this within a repeating section? I would think the filters would be fine
without using current.

Are you using a setfield action on the dropdown or using defaults on the
other fields?

Try going to http://www.infopathdev.com and search on current() to get some
examples of how to use it.

--
Clay Fox / Microsoft InfoPath MVP
www.InfoPathDev.com / The InfoPath Authority / Downloads, Samples, How-To,
Experts, Forum


Welchs said:
I have a form that I am trying to force populate related data fields. It is
not working. The force population fields are listing the first row in the
SharePoint no matter what is selescted in the first field.

In a set of 5 fields, the first field is selected from a drop down list.
(this is populated by SharePoint) Based on this selection, the next 4 fields
should populate with information from SharePoint (same list) related to the
selection.

Example: Johnny is selected, his age, weight, dob, and height should force
populate from the list. They are not.

Can anyone help?
The formula for "Get Related Data" is currently-
condition: Plan_Name=SP_Plan Name
Set a field's value: .=@BCP_Vendor_Name[.=current()]
VIN1=@BCP_Vendor_Name=current()]
xpath is not checked

Thanks, I am in a project crunch.
S.Welch
 
C

Clay Fox

If you have a list which returns
ID Name Description

You would have a FormID, FormName, and FormDesc in your main data source

You would have a dropdown, bound to FormID, which used the ID field as its
source.
Then add a rule that would set FormName to Name[FormID = ID] and set
FormDesc with Description[FormID= ID]

So you would use a filter to get the appropriate row of data.

Hope that helps.
Otherwise email me.
http://www.infopathdev.com/members/clayfox.aspx
--
Clay Fox / Microsoft InfoPath MVP
www.InfoPathDev.com / The InfoPath Authority / Downloads, Samples, How-To,
Experts, Forum


Welchs said:
Clay,
Thank you for responding. This is not in a repeating section. This is just
a table with fields coming from a SP list.

If I checked the x path box would this work?

I am using setfield in the Get related data rule attached to the drop down
properties.

What filters would be fine without using current ().? Your saying go from
this:

Set a field's value: .=@BCP_Vendor_Name[.=current()]
VIN1=@BCP_Vendor_Name=current()]

To This:
Set a field's value: .=@BCP_Vendor_Name
Thanks,
Stacie
Clay Fox said:
I am guessing it has to do with the current function you are trying to use.
current() can be use to specify an Xpth but not on its own.

Is this within a repeating section? I would think the filters would be fine
without using current.

Are you using a setfield action on the dropdown or using defaults on the
other fields?

Try going to http://www.infopathdev.com and search on current() to get some
examples of how to use it.

--
Clay Fox / Microsoft InfoPath MVP
www.InfoPathDev.com / The InfoPath Authority / Downloads, Samples, How-To,
Experts, Forum


Welchs said:
I have a form that I am trying to force populate related data fields. It is
not working. The force population fields are listing the first row in the
SharePoint no matter what is selescted in the first field.

In a set of 5 fields, the first field is selected from a drop down list.
(this is populated by SharePoint) Based on this selection, the next 4 fields
should populate with information from SharePoint (same list) related to the
selection.

Example: Johnny is selected, his age, weight, dob, and height should force
populate from the list. They are not.

Can anyone help?
The formula for "Get Related Data" is currently-
condition: Plan_Name=SP_Plan Name
Set a field's value: .=@BCP_Vendor_Name[.=current()]
VIN1=@BCP_Vendor_Name=current()]
xpath is not checked

Thanks, I am in a project crunch.
S.Welch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top