Auto-fill text box from SQL db

M

Markf

Hello,

New to InfoPath and I am stumped. I am trying to auto-fill a text box
control with SQL data that would be dependent on two drop-downs and enable a
user to edit the contents of the text box before submitting the form.

I can pull the data from the SQL db for the two drop-down boxes and can get
the first value (Ex. ‘Computer1’) to populate the text box but that is all
that I can get. How can I populate with the remaining computer names in the
text box based on the input from the two drop-downs?

Thanks!
Mark


1) Query #1 = data for drop-down box #1
2) Query #2 = data for drop-down box #2
3) Query #3 = data for text box where user can edit server list (Ex.)
‘ComputerName’ field is the only thing I want to populate the text box with
and I use InfoPath data filters to filter on the two drop-downs.


Ex.
Computer1 -> auto-filled
Computer2 -> auto-filled
Computer3 -> auto-filled; user deletes this line
Computer4 -> auto-filled
Computer5 -> user adds this line


Query #1
SELECT ApplicationVersionID, ApplicationName, Applicationstatus
FROM Applications AS Applications
ORDER BY ApplicationName

Query #2
SELECT EnvironmentID, EnvironmentName
FROM Environments AS Environments
ORDER BY EnvironmentName

Query #3
SELECT svr.ComputerName, ap.ApplicationName, env.EnvironmentName
FROM Servers AS svr INNER JOIN
Allocations AS alloc ON svr.AssetNumber =
alloc.AssetNumber INNER JOIN
Assignments AS asn ON alloc.AssetNumber =
asn.AssetNumber INNER JOIN
Applications AS ap ON asn.ApplicationID =
ap.ApplicationVersionID INNER JOIN
Environments AS env ON alloc.EnvironmentID =
env.EnvironmentID
 
M

Markf

I am wondering now if I went about this the wrong way. Is there another way
to bring the results of a SQL query into a form and then to allow a user to
edit those results before submitting the form?

Thanks for any help!
Mark
 

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