Multi-Select lists using SQL Server - selection issues

J

JED

Hello, let me start out by saying that I am new to InfoPath.

Here is my scenario:

I create a multi-select list that is bound to a sql 2000 data
connection that has an already created query. When a user opens the
form, the form hits the database and populates the multi-select lists.
Currently, I have the form submit sending me an email with the
sumbitted infopath document.

Here is Problem 1:

I open the InfoPath document and all of my form selections persist
EXCEPT the selections from the multi-select list that is populated from
the sql server. I understand that the selections are getting
overwritten because every time the form opens it is repopulating the
multi-select list. How can I make it so that after the form is
submitted, the form no longer updates the multi-select lists from sql
server? I am not sure what to do to persist my multi-list selections.

Here is Problem 2:
Also, how would you copy the text from the selected items from the
multi-select list to a textbox or something. For example, in Asp.Net I
could use a label and after each multi-list selection, I could update
the label displaying the user's selections. I just don't know how to
recreate that scenario in InfoPath.

I appreciate any and all help.
Thanks!
Jennifer
 
A

Adam Harding

Hi

Problem One

Your mutli select values as you say are being overwritten as each time the
form opens it refreshes those connections. Instead of having the
Multi-select list bound to open when the form opens, put it on a rule when
the form opens relative to a field.

IE We have an indicator field called Field1

We set a rule in Form options to refresh the multi select in all cases where
Field1 is not equal to A.

Second step is to set Field1 to the value A when the form is submitted.
This will stop your data being overwritten.

Problem2:
Set the TextField concerned to have the value of the concatenated multi
select fields
Not the most elegant solution but would achieve what you are after,
admittedly without formatting. On the bright side you can separate the
values with : , . etc

I hope this makes sense, if you want a fuller desciption mail me

Cheers Adam
(e-mail address removed)
 
J

JED

Thank you for your reply! I am trying to work through your suggestion
now. I am a bit confused though. I am not sure I understand how to
change the binding on the multi-select list.

I have created the multi-select using a repeating table with a checkbox
and textbox. I have bound the repeating table to the datasource I
need. The checkbox and textbox is then bound to the specific fields in
the query that I need.

I conceptually understand what you are trying to do but I haven't
figured how to change the binding that you are talking about: "Instead
of having the
Multi-select list bound to open when the form opens, put it on a rule
when
the form opens relative to a field." Your statement leads me to
believe that I can change the binding properties...but I haven't found
anywhere to do that.

Can you give me more detail? I am not sure that I am on the right
track.
Thanks!
Jennifer
 
A

Adam Harding

Jennifer

Go into Tools-Data Connections

Click on your secondary data source and click 'modify'.

click 'Next' and then UNTICK the box that says get this data every time the
form opens.

Hence you do not change the binding but DRIVE the query from an action in
your form stopping it from overwriting. It is the very fact that the ddata
is refreshed every time the form opens that is causing your problems.

Cheers Adam
 

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