Autopopulate from Sharepoint

S

Shem

Hi Folks, a newbie here. Is it possible to to enter a name ina field in
Infopath and it looks up data in sharepoint and if a match is found it will
autopopulate fields within the infopath form?? Some code would be nice if
anyboday can help

Thanks in advance
 
M

Michelle

Hi Shem

Yes it is possible. And the best news - you can do this without code!

Try this as an example
(1) Create a secondary data source to connect to your sharepoint list (I
connected to a task list in a team site)
(2) Add a drop down list field to your form and set its properties to
retrieve data from the secondary data source you created. (I had mine pull
the title from the task list)
(3) Add another text field to your form
(4) Add a rule to your drop down list that sets a field's value. My rule
looked like:
field6 = @Assigned_To[@Title = field5]
Here what I am doing is setting field6 (my textbox) to the value in the
Assigned_To field in the Sharepoint Task List where the title equals the
title I selected from my drop down list (field5). I'm using filtering.

Hope this helps.
Michelle
 
S

Shem

Hi Michelle,


Would it be possible to send me a copy of the list data and the infoform
sample as I am not really sure how to set everything up and if I can see a
sample in front of me it will be much easier for me to understand????

Regards,

Allan


Michelle said:
Hi Shem

Yes it is possible. And the best news - you can do this without code!

Try this as an example
(1) Create a secondary data source to connect to your sharepoint list (I
connected to a task list in a team site)
(2) Add a drop down list field to your form and set its properties to
retrieve data from the secondary data source you created. (I had mine pull
the title from the task list)
(3) Add another text field to your form
(4) Add a rule to your drop down list that sets a field's value. My rule
looked like:
field6 = @Assigned_To[@Title = field5]
Here what I am doing is setting field6 (my textbox) to the value in the
Assigned_To field in the Sharepoint Task List where the title equals the
title I selected from my drop down list (field5). I'm using filtering.

Hope this helps.
Michelle



Shem said:
Hi Folks, a newbie here. Is it possible to to enter a name ina field in
Infopath and it looks up data in sharepoint and if a match is found it will
autopopulate fields within the infopath form?? Some code would be nice if
anyboday can help

Thanks in advance
 
S

Shem

Hi Michelle,

I have tried this but it seems that the XML query isn't working. It says it
has no errors but it doesn't bring back any data. Arrrggghhhhhh

Can you help please.

Michelle said:
Hi Shem

Yes it is possible. And the best news - you can do this without code!

Try this as an example
(1) Create a secondary data source to connect to your sharepoint list (I
connected to a task list in a team site)
(2) Add a drop down list field to your form and set its properties to
retrieve data from the secondary data source you created. (I had mine pull
the title from the task list)
(3) Add another text field to your form
(4) Add a rule to your drop down list that sets a field's value. My rule
looked like:
field6 = @Assigned_To[@Title = field5]
Here what I am doing is setting field6 (my textbox) to the value in the
Assigned_To field in the Sharepoint Task List where the title equals the
title I selected from my drop down list (field5). I'm using filtering.

Hope this helps.
Michelle



Shem said:
Hi Folks, a newbie here. Is it possible to to enter a name ina field in
Infopath and it looks up data in sharepoint and if a match is found it will
autopopulate fields within the infopath form?? Some code would be nice if
anyboday can help

Thanks in advance
 
S

Shem

HI Again Michelle,

Do you know how to do this programatically, as I have tried to update ome
fields before and some scripting tutorials have told me to remove an XSIl=nil
attribute froma a field node. Maybe this is what is causing the issue. Do you
know how to capture the data within the data connection????? If so I can do
this (i think) via code.

Michelle said:
Hi Shem

Yes it is possible. And the best news - you can do this without code!

Try this as an example
(1) Create a secondary data source to connect to your sharepoint list (I
connected to a task list in a team site)
(2) Add a drop down list field to your form and set its properties to
retrieve data from the secondary data source you created. (I had mine pull
the title from the task list)
(3) Add another text field to your form
(4) Add a rule to your drop down list that sets a field's value. My rule
looked like:
field6 = @Assigned_To[@Title = field5]
Here what I am doing is setting field6 (my textbox) to the value in the
Assigned_To field in the Sharepoint Task List where the title equals the
title I selected from my drop down list (field5). I'm using filtering.

Hope this helps.
Michelle



Shem said:
Hi Folks, a newbie here. Is it possible to to enter a name ina field in
Infopath and it looks up data in sharepoint and if a match is found it will
autopopulate fields within the infopath form?? Some code would be nice if
anyboday can help

Thanks in advance
 
S

Shem

Hi Michelle,

I saw one f your other posts and I am really interested in how I can get the
data from Sharepoint via secondary connections. I am not sure how to get the
data from the DataAdapter and wondering if you can assist?

I also managed to get the autopopulate to work after rebooting PC it worked ;)

Also, do you know a way in which I can get a the name of the active user on
Infopath. I know you can check to see if a specific user is active, but you
have to know the name of the user and send to ISCURRENTUSER command. However,
if you do not have a sharepoint list with that data is it possible to get the
user from some other way????

Thanks, your a great Gal :)


Michelle said:
Hi Shem

Yes it is possible. And the best news - you can do this without code!

Try this as an example
(1) Create a secondary data source to connect to your sharepoint list (I
connected to a task list in a team site)
(2) Add a drop down list field to your form and set its properties to
retrieve data from the secondary data source you created. (I had mine pull
the title from the task list)
(3) Add another text field to your form
(4) Add a rule to your drop down list that sets a field's value. My rule
looked like:
field6 = @Assigned_To[@Title = field5]
Here what I am doing is setting field6 (my textbox) to the value in the
Assigned_To field in the Sharepoint Task List where the title equals the
title I selected from my drop down list (field5). I'm using filtering.

Hope this helps.
Michelle



Shem said:
Hi Folks, a newbie here. Is it possible to to enter a name ina field in
Infopath and it looks up data in sharepoint and if a match is found it will
autopopulate fields within the infopath form?? Some code would be nice if
anyboday can help

Thanks in advance
 
S

Shem

Hi Afgain, Michelle,

I have finally managed to extract the dataconnection data into an xml
format. However when I try to parse it for SelectNodes etc, it errors due to
the fact that it:

Regferences an undeclared namespace.

When the dataconnection data comes back the eleements have a namespace tage
like <dsf:EmployeeName> and I cannot seem to do xml queries on these elements
due to the fore mentioned namespace issue. How do I get round this? Sorry for
all the questions but you seem pretty good at this stuff.

Cheers,

Allan

Shem said:
Hi Michelle,

I saw one f your other posts and I am really interested in how I can get the
data from Sharepoint via secondary connections. I am not sure how to get the
data from the DataAdapter and wondering if you can assist?

I also managed to get the autopopulate to work after rebooting PC it worked ;)

Also, do you know a way in which I can get a the name of the active user on
Infopath. I know you can check to see if a specific user is active, but you
have to know the name of the user and send to ISCURRENTUSER command. However,
if you do not have a sharepoint list with that data is it possible to get the
user from some other way????

Thanks, your a great Gal :)


Michelle said:
Hi Shem

Yes it is possible. And the best news - you can do this without code!

Try this as an example
(1) Create a secondary data source to connect to your sharepoint list (I
connected to a task list in a team site)
(2) Add a drop down list field to your form and set its properties to
retrieve data from the secondary data source you created. (I had mine pull
the title from the task list)
(3) Add another text field to your form
(4) Add a rule to your drop down list that sets a field's value. My rule
looked like:
field6 = @Assigned_To[@Title = field5]
Here what I am doing is setting field6 (my textbox) to the value in the
Assigned_To field in the Sharepoint Task List where the title equals the
title I selected from my drop down list (field5). I'm using filtering.

Hope this helps.
Michelle



Shem said:
Hi Folks, a newbie here. Is it possible to to enter a name ina field in
Infopath and it looks up data in sharepoint and if a match is found it will
autopopulate fields within the infopath form?? Some code would be nice if
anyboday can help

Thanks in advance
 

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