Question on queries - InfoPath Dev
in

InfoPath Dev

Question on queries

Last post 03-24-2011 11:56 AM by leoffneym. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-24-2011 08:47 AM

    • JFinn
    • Not Ranked
    • Joined on 03-24-2011
    • Posts 6

    Question on queries

    Using InfoPath 2007 and MOSS 2007 on Windows XP 

    I'm a fairly new user of InfoPath 2007. Most everything I've learned has been from books and blogs. But I can't seem to figure out this particular query. Here's the scenario:

    I created a Purchase Order in InfoPath 2007. It queries a vendor list to populate the form with the correct vendor information. The form is submitted to save to a SharePoint site (using the workflow for approval) with all fields promoted so we could access the information for our Check Requests. When creating the Check Requests, I had to create a separate form because it goes through a separate approval process. So I would like to query the SharePoint site from the Check Request to pull in the PO information. I set up one field that pulls in a drop-down list of all the PO's saved in the SP site. Once we select from that list, I would like the Check Request to populate certain fields with information from that specific PO form that is completed on SharePoint. I used similar logic to the vendor query in the PO form, but I cannot get it to work at all. I get no errors at all, but the information just isn't populating in after I select a PO number.

    Is this even something that can be done?

    Please help.

     Thanks!

    Joanne

  • 03-24-2011 10:45 AM In reply to

    Are you filtering to get the other fields, or just pulling them straight from the PO data source?

  • 03-24-2011 11:00 AM In reply to

    • JFinn
    • Not Ranked
    • Joined on 03-24-2011
    • Posts 6

    I've tried both ways but to no avail. I've set up an Open rule to query both the SharePoint List and the Vendor List. Then I have a drop-down list that populates with all the POs in the Sharepoint list (Called FileName in the Check Request form). So, what I want to do is, depending on what PO is selected in that drop-down, populate the Client ID, Client Address, Client City, etc. among other fields that are promoted in the SharePoint List. On the PO drop-down box, I've got it set right to pull the list box entries. I created a dummy field (VenName) that eventually won't show and I pulled in a value based on the selection in the drop-down box. Then I opened properties for the PO drop-down, and set a Rule to set the VenName as the current value selected in the PO drop-down. (and that populates just fine). But if I change that to make it pull in the actual Vendor Name, it returns a blank field....no error.

    My coding experience and knowledge is very limited, so I'm either not considering some kind of logic, or I'm looking at this too deeply. :)

     

  • 03-24-2011 11:22 AM In reply to

    You will learn more with experience.

    Try this and see if works for you:

  • In the FileName Properties 
  • add a new rule
  • click add (name the rule as you wish)
  • click add action
  • from the drop down, select Set a fields value
  • in the Field text box, select the find a field button, find the Client ID in the Main Data source
  • in the Value text box, click the function(fx) button
  • click Insert Field or Group
  • Change the Data Source to the data source that contains the information needed, will not be the Main data source
  • select the field needed (in this example, Client ID, maybe a different name)
  • click the Filter Data button
  • click the Add button
  • from the left drop down, find the FileName from the data source that contains the information needed, will not be the Main data source
  • leave the center on as is equal to
  • from the right drop down
  • find the FileName in the Main data source
  • click OK all the way out, if you click cancel at anytime, you will have to redo all of this
  • Test form, if it works as intended, redo for all fields needed, changing the field needed from the secondary datasource

    The way you were probably doing it wasn't wrong, it just didn't have the necessary information to do what it needed when it processed itself.

     

  • 03-24-2011 11:47 AM In reply to

    • JFinn
    • Not Ranked
    • Joined on 03-24-2011
    • Posts 6

    OMG - This worked perfectly except for one thing:

    • from the left drop down, find the FileName from the data source that contains the information needed, will not be the Main data source
    • leave the center on as is equal to
    • from the right drop down
    • find the FileName in the Main data source

    I switched these around so that the left was pulling my file name from main, and equalling it to the correct name in the data source.

    So, now I get it.....the filter is like the "where" portion of an if/then statement, right?

    Thank you so much. This has confused me all day and I'm so glad to get it fixed now! 

    Joanne

  • 03-24-2011 11:56 AM In reply to

    Happy to hear it worked.

    The filter is a great tool.

    Filter is kinda like an if/then statement. It is also so much more.

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.