Using form data as datasource for drop down listbox

L

Lee Newson

Hi,

I am using data in the form as entries for a drop down list box, the only
problem is that i have duplicate entries in the list box, does anyone know
how i can only have a single entry.

basically this form gets information from a document library on sharepoint
and the list box is a filter for 'Owner', i have tried to get information
from a 'User Information' table, which i know sharepoint has because you can
use it as a lookup table for columns in sharepoint, but i cannot access this
information from sharepoint it seems.

i have tried using the UserGroup.asmx web service and the
UserProfilesService (doesnt seem to do anything) but i cannot get user
information from sharepoint, if anyone knows how to do this please let me
know.

thanks in advance for any help you can give me

regards

Lee
 
L

Lee Newson

I have been away for a few days and have jsut seen your reply. I have tried
it and it worked spot on... thanks very much for your help.

Lee


"Greg Collins [MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in message
Let's say you have a drop-down list box that is populated from a repeating
table in your main data source. And it is specifically using my:field1 as
the value in the repeating table.

You would put a filter on the drop-down list box with the following
expression:

. = not(. = preceding::my:field1)

I know that looks funny, but basically what this filter does is to say that
if the drop-down list already has an option with the value trying to be
added (while the list is being built), then don't add it. This makes it so
that you have only unique values in your drop-down list.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



Hi,

I am using data in the form as entries for a drop down list box, the only
problem is that i have duplicate entries in the list box, does anyone know
how i can only have a single entry.

basically this form gets information from a document library on sharepoint
and the list box is a filter for 'Owner', i have tried to get information
from a 'User Information' table, which i know sharepoint has because you can
use it as a lookup table for columns in sharepoint, but i cannot access this
information from sharepoint it seems.

i have tried using the UserGroup.asmx web service and the
UserProfilesService (doesnt seem to do anything) but i cannot get user
information from sharepoint, if anyone knows how to do this please let me
know.

thanks in advance for any help you can give me

regards

Lee
 

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