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 / February 2008

Tip: Looking for answers? Try searching our database.

Retrieve multiple fields from Sharepoint list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TimS - 27 Feb 2008 01:12 GMT
I have a Sharepoint list with three fields - Location, Business Hours, and
Point of Contact.  I have made this list a secondary data source to my
infopath form.  My form has a repeating table on it, with three fields -
Location, BusinessHours, and POC.  I have removed the default textbox bound
to the Location field from the repeating table, and replaced it with a
dropdown list box, rebinding it to the Location field.  Now, what I would
like it to do, is when I pick the desired row in the Location field, for it
to populate the other two fields from the corresponding row (record) in the
Sharepoint list.  So if I pick Location 1, it will automatically fill in the
business hours and POC for Location 1.  Is this functionality possible
without alot of coding?
Clay Fox - 27 Feb 2008 01:36 GMT
This is possible through rules and actions.

Add a rule to your drop down that has an action to set each field witht he
value from your datasource. Remember to use a filter so that you set the
values where the location = the location selected in the dropdown.
Signature

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

> I have a Sharepoint list with three fields - Location, Business Hours, and
> Point of Contact.  I have made this list a secondary data source to my
[quoted text clipped - 7 lines]
> business hours and POC for Location 1.  Is this functionality possible
> without alot of coding?
TimS - 27 Feb 2008 01:52 GMT
Thanks, Clay.  Do I need to apply a filter to this rule, or something?  How
it is now behaving is that if I pick Location B, it populates the other two
fields, but with the values corresponding to the Location A record instead of
the Location B record.

Tim

> This is possible through rules and actions.
>
[quoted text clipped - 13 lines]
> > business hours and POC for Location 1.  Is this functionality possible
> > without alot of coding?
Clay Fox - 27 Feb 2008 02:03 GMT
Yes I think you need the filter. If you do not use a filter it will take the
first value in the list.

When selecting the field to use as the source (POC from the secondary DC)
there will be a filter button in the lower left of the window.

Add and then select location (in the secondary data source) = location
(value of the field your dropdown is bound to).
Signature

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

> Thanks, Clay.  Do I need to apply a filter to this rule, or something?  How
> it is now behaving is that if I pick Location B, it populates the other two
[quoted text clipped - 20 lines]
> > > business hours and POC for Location 1.  Is this functionality possible
> > > without alot of coding?
TimS - 27 Feb 2008 16:49 GMT
Thanks, Clay, for your responses.  Ok, this is "sort of" working, but not yet
adequately.  Two issues:

1. When you're designing a form template for use in a browser, when you try
to apply a filter, you get the following message:  "Filtering is not
supported in browser-enabled form templates."  I temporarily unchecked the
browser compatibility checkbox, and it looks like I can set up a filter, and
then when I re-enable browser compatibility later, the filter still seems to
be applied.  True?

2.  If the field to which my dropdown is bound is within a repeating table,
there can be more than one record, so when creating the filter, I need to be
able to specify to filter on the location of THAT record.  Can this be done
by manually editing the filter formula (e.g. use
@PointOfContact[@Location = this.ChangeLocation]
or
@PointOfContact[@Location = my:ChangeLocation]
instead of just
@PointOfContact[@Location = ChangeLocation]

(These two syntaxes aren't accepted - is there a correct one that will work?)

Thanks again,

Tim

> Yes I think you need the filter. If you do not use a filter it will take the
> first value in the list.
[quoted text clipped - 29 lines]
> > > > business hours and POC for Location 1.  Is this functionality possible
> > > > without alot of coding?
Clay Fox - 27 Feb 2008 16:59 GMT
If you rule is within a specific record then you do not need the filter as it
will use the current record.  The current() function also might be needed.

I do not believe the filter will work even if design checker does not catch
it.  You can try and find out.
Signature

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

> Thanks, Clay, for your responses.  Ok, this is "sort of" working, but not yet
> adequately.  Two issues:
[quoted text clipped - 55 lines]
> > > > > business hours and POC for Location 1.  Is this functionality possible
> > > > > without alot of coding?
 
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.