General Solution Question - InfoPath Dev
in

InfoPath Dev

General Solution Question

Last post 08-08-2006 11:25 AM by Shiraz Cupala. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 08-03-2006 07:46 AM

    • Ray
    • Not Ranked
    • Joined on 08-01-2006
    • USA
    • Posts 9

    General Solution Question

    New to InfoPath. I'd just like to ask for some suggestions for a general solution. I have an MS Access database of info that is used to track about 1000 pc names on a network and whether a given name is currently used, unused, or corrupt. It also tracks the office location and some other technical details.

    I have created an InfoPath form that allows for a new record to be added, or one record can be queried and updated. There are about 18 data fields per record, so i decided to only show one record on the form at a time. The database table has a unique primary key or workstationName.

    In order to make this useful for the networking team, I need to give them an easy way to update their database. The InfoPath form has done this. But, they also need to be able to query the database by status (used, unused, corrupt workstation names) and geographic location. They need to see what workstation names are currently unused so they can reuse the names instead of creating new ones all the time.

    Like I mentioned, I have the initial form created that allows for records to be added and updated. How do I give the users easy access to some queries or reports that show used and unused workstation names? I already have one query button on the main infopath form. Do I add other buttons to run reports from infopath or access? Any suggestions you could give me would be helpful.

    Our environment here is infopath, sharepoint, and ms access. I have a solid programming background, but only a little experience in scripting languages (and these MS apps) and it's been a few years since I touched them.

    Thanks for your help.
  • 08-03-2006 08:09 AM In reply to

    Re: General Solution Question

    Hello Ray,
    You can go to Tools -> Data connections and add more query or recieve data connections to this MS access database. Set this data connection to not get data on load of the form. This can be done in the last page of the wizard. Once the data connection is created, Add a button to the view and in the button properties click on the Rules button. Add a new rule to query the data connection.

    You should have another secondary DOM available which you can acess in the dropdown in the data source task pane. Just drag/drop the fields appropriately into this view or a new view to show them. If you create a new view you will need to add a rule to switch the view also when you click on the button to query the data from the DB.

    Hope this helps!
    Shanthi Reddy
  • 08-03-2006 01:45 PM In reply to

    • Ray
    • Not Ranked
    • Joined on 08-01-2006
    • USA
    • Posts 9

    Re: General Solution Question

    quote:
    Originally posted by Shanthi

    Hello Ray,
    You can go to Tools -> Data connections and add more query or recieve data connections to this MS access database. Set this data connection to not get data on load of the form. This can be done in the last page of the wizard. Once the data connection is created, Add a button to the view and in the button properties click on the Rules button. Add a new rule to query the data connection.

    You should have another secondary DOM available which you can acess in the dropdown in the data source task pane. Just drag/drop the fields appropriately into this view or a new view to show them. If you create a new view you will need to add a rule to switch the view also when you click on the button to query the data from the DB.

    Hope this helps!

  • 08-03-2006 01:54 PM In reply to

    • Ray
    • Not Ranked
    • Joined on 08-01-2006
    • USA
    • Posts 9

    Re: General Solution Question

    Oops. goofed there with the reply.

    Okay, I have made progress. I added a button on my default view that will (1) run a query using my secondary data connection and (2) automatically switch over to my 'report listing' view. That's good.

    Now, is there any way to make this query (using a secondary data connection) conditional? I'd like to allow the user to enter a value into a 'queryField' to condition the select statement. If the user enters a value of 'used', only records with a status='used' will be displayed. Doing this is easy enough on the primary view with the primary data connection. But is possible to do on the secondary view using the secondary data connection? Even if both data connections are for the same Access table.

    It doesn't seem like it is possible, because for my secondary connection, I only have 'dataFields' available to me in the 'Data Sources' Task Pane. No 'queryFields' are available.

    Any thoughts?

    Thanks, Ray
  • 08-03-2006 03:22 PM In reply to

    Re: General Solution Question

    What you need to do is query the secondary before hand (probably when the form opens by default)and then use filters to only display the record or records you wish to view status="used". Not as efficient since your secondary is queried in its entirety but all of the data is there you just have to filter out what you do not need. You can put the filter on a section by using conditional formatting to hide everything not used or if you are setting other field values you can use filters.
  • 08-07-2006 11:42 AM In reply to

    Re: General Solution Question

    You can have the user enter data to populate the query field.

    1) Drag the query parameter from the secondary datasource (secdom) into the view. Let the user enter the value directly. Then your button with rules will execute the query and it will end up using whatever value is in the query field.

    2) If you already have a field on your form that you want to use, just setup a rule to copy that value into the query parameter node in the secdom. Put the rule on the button, or on the onLoad.

    Note, I'm not sure when the onLoad queries vs. rules fire, so you may have to not auto query the data source onLoad but instead setup a query rule that also sets your query param field.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 08-07-2006 11:49 AM In reply to

    Re: General Solution Question

    One more note. My comments were regarding the Main Data Source. I noticed you said you don't have the query param fields in the secondary data source. That is a limitation. You can't parameterize the query in a secondary data source without code.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 08-08-2006 09:14 AM In reply to

    • Ray
    • Not Ranked
    • Joined on 08-01-2006
    • USA
    • Posts 9

    Re: General Solution Question

    Thanks for all the suggestions and help. I was able to come to a satisfactory result. My web form has two pages (or views). the first one shows one record at a time based on the query. the second one shows a list of records from the same database based on 3 seperate filter fields. Both pages of the web form use the main data source. I have added a button on each page to switch back and forth between forms.

    Its not the most elegant solution. But, with what I have available to me, it will serve the purpose.
  • 08-08-2006 11:25 AM In reply to

    Re: General Solution Question

    Great! Glad you were able to find a workaround. One thing you can do to make the view switching look better is to format them to look like a tabbed dialog. Info on that is located here:http://www.infopathdev.com/howto/tutorials/default.aspx?i=7810fbeb7db6415e8b6d96a4a2bfd005 With some additional work on the borders and shading this can look very attractive.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.