Requesting Assistance Writing a Unique Value Query Expression - InfoPath Dev
in

InfoPath Dev

Requesting Assistance Writing a Unique Value Query Expression

Last post 10-07-2015 01:13 PM by Curtis. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-19-2015 07:56 PM

    Requesting Assistance Writing a Unique Value Query Expression

     I have a repeating table that is bringing back all rows in the secondary connection list when queried. The query is initiated by, and the returning data in the repeating table should only be based upon, the name of the park that is auto-populated into the form Park field.

     Right now the query returns the entire list, plus a blank first row. I was instructed to write an expression that will eliminate all returns except those matching the Park in the park field. Now that I've figured out how and where to write the query, I need instruction on how the query should be written to achieve the end goal.

     Thank you,

  • 09-23-2015 03:37 PM In reply to

    Re: Requesting Assistance Writing a Unique Value Query Expression

     Instead of running the query when the form opens, add rules to the park field in your form. When a park is selected, set the query field for Park in your secondary data connection to the value of the main data source Park field. The run the query. That should return just the data for the selected park. For additional information on SharePoint list connection query fields, please see: http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=129

    Hilary Stoupa

  • 09-29-2015 02:50 PM In reply to

    Attempted what you suggested (see attached). I am unable to set the Query/Rule properly, to return only Noncompliant employee Last Name and Date of Cert to the repeating table on the top right, based on the text auto-populated to the form Park field.

    The hyperlink you provided appears to required two pull down boxes to achieve the goal. I only have one, Last Name. Can a Conditional Formatting expression be written? If so, can you provide guidance on you it should be formulated?

  • 10-01-2015 09:07 AM In reply to

    Re: Requesting Assistance Writing a Unique Value Query Expression

      I suggested that URL to see if that would help you understand the concept, not as an exact match to your question.

     In this form, on the Park rule, you have two rules. Both have a condition that Park in the secondary data connection is equal to Park in the main data connection. That condition will never be true, as you have not queried the secondary data connection. You have to query the data connection to return data to your form.

     You should remove the conditions on both of the rules.

    You have a rule to run the query, but it is after the rule to set the values. If you set the field values before you query the secondary data connection, there will be no data to put in the fields. This is why I have often suggested you put your secondary data sources on your form, so you can see the values.

    You never set the query field in your secondary data connection, but simply execute it. Even in your rule that executes the query, you are trying to set a main data source field from the secondary data connection without querying it first. I don't understand why.

    I'm attaching a zip file with your form with some changes and some screenshots in a Word document that will hopefully outline this process in a way that makes sense. I went ahead and put your secondary data source fields on your form at the bottom with a button that executes your query so you can experiment with this. It is very easy to delete these sections once you understand how things work. 

    Hilary Stoupa

  • 10-07-2015 01:13 PM In reply to

    Re: Requesting Assistance Writing a Unique Value Query Expression

     Hilary:

     I'm back at it again. On the Suppression form I've tried what you recommended. Now, when I key in a valid FF Name, in the repeating table/section appears all members at that specific site.

     The form is just about where it needs to be. I need now to limit the number of employees returned in the repeating table to only those employees who are "Noncompliant", in a certain skill.

    I will eventually create one table for each skill, based on the process we are working through now. Each query should only return Noncompliant employees to each table, rather than all employees at the site.

    I've attached the latest form.

    Thank you,

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