Display filtered information based on selections on 2 drop-down menus - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Display filtered information based on selections on 2 drop-down menus

Last post 04-06-2012 02:11 PM by Hilary Stoupa. 18 replies.
Page 1 of 2 (19 items) 1 2 Next >
Sort Posts: Previous Next
  • 04-02-2012 01:56 PM

    Display filtered information based on selections on 2 drop-down menus

    Hello, I have a newbie question and can’t seem to find what I need on the forum. I am developing a web-based form in IP 2010. I have a SharePoint list with 3 columns: Business Unit, Position Level, and Training Course Title.  Training at our company is dependent upon which BU and position level you are in. I have tied Business Unit and Position Level to the SharePoint list just fine and created drop-down menus for each. Now, I need to create the 3rd field that will display training courses based on which BU and position level were selected above.   

    I’m not sure which field type to use for “display” rather than “input.”  I don’t know how to tell a field to display information based on answers given above.  I have tried numerous rules and filters but nothing seems to stick.  I can get a field to display ALL training courses from my SP list, but not filter.

     I am fine with using a “Submit” button if I can’t get it to show up in the field automatically after the 2nd drop down menu is populated if that’s easier. If this question has been answered before, I’m happy to look at the former post, just need some help finding it. Thanks for any help or direction you can provide.

     

    Filed under: ,
  • 04-02-2012 02:08 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    Hi there - welcome!

    It sounds like you are saying you have the first two drop downs behaving the way you want them to, it is just this third one that is an issue for you. Is that accurate?

    If this were my form, the first thing I'd do is drag the repeating data node from the data source that is going to be used for the training course dropdown onto the form and preview it - that way you can see what the secondary data actually looks like. I'd also take the fields that are bound to the first two drop down controls and drag those onto my form as text boxes. Then I'd preview - this way you can see exactly what the values are in the fields bound to the first two drop downs, and the data in the secondary data source. In order to create your filter, you need to know what matches - does that make sense? You can always create a new view to add these controls to and delete it after if you are concerned about making a mess of your real view.

    Hilary Stoupa

  • 04-03-2012 01:20 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    Ohhh, I'm really showing my newbie now! :)

    I'm not sure what "drag the repeating data node from the data source that is going to be used for the training course dropdown onto the form and preview it" means to do.  Can I drag something directly from a data source onto the form?  I thought I had to create fields first, then link the data sources to fields.  I have done that (so I thought), but when I drag the category names into my form it just creates blank text boxes.  However, my drop-down lists seem to understand what to do since they are populated with the names.

    Here is the filter I tried applying to position level (the 2nd drop-down menu):

    Condition:

    When BusinessUnit is present and PositionLevel is present

    Run this action:

    Set a field's value:

    CourseTitle[BusinessUnit = Title and PositionLevel = PositionLevel]

    Trying to tell the 3rd field (CourseTitle) to display the Course Title when both the dropdown lists are populated, and telling it to search the data source for the matching business unit and position level.

    That's where I got confused as to what field type can display data, as opposed to just be used to input data.

    I don't want to be that annoying forum member who requests step-by-steps when it really isn't that hard. I just feel like I'm 75% of the way there and I'm frustrated that I can't figure out how to make this last piece work on my own.  I have watched so many YouTube videos and read so many tutorials on different things, but they aren't trying to do the same thing as me.  I really wanted to learn it on my own, I'm not lazy!  :-)  Thanks for your help.

  • 04-03-2012 02:05 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    You can drag something directly from the data source onto the form. It will create text box controls. I am asking you to do this for the initial two fields you have drop downs connected to because I have no way of knowing what your field's actual value is, and since you are new, I'm kind of guessing you may also not know this. When you preview and select your drop down options, the text boxes will show the

    It sounds to me like you are just setting a field's value, though, that the CourseTitle field is just a text box?

    I'm not sure I know what this means:

    That's where I got confused as to what field type can display data, as opposed to just be used to input data

    If you just want to display data, you can use a calculated value (expression box in IP 2007) - you wouldn't need a field at all.

    If you want to attach your form, you can, under the Options tab, and I can take a quick look.

    Hilary Stoupa

  • 04-04-2012 12:32 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    Thank you, Hilary!  You are very kind.  You have given me a couple of ideas of things to try (for example, I do not see 'expression box' as an example of a field I can add, but it sounds exactly like what I need)

     When I get a chance I'll try these things out and let know if it works. 

  • 04-04-2012 12:58 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    An expression box (InfoPath 2007) or calculated value (InfoPath 2010) is not a type of field - it is a control. You'll find it in your controls in your form when designing, either in the ribbon for IP 2010, or the task pane for IP 2007.

    Hilary Stoupa

  • 04-04-2012 01:08 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    Yes, I was wrong there.  I created a brand-new form.  What I had done on the old form was causing me confusion.

     I mapped my data connection, then dragged my first 2 data source columns into the brand new form.  I changed these to drop-down lists - they work great.

    Then I used the walkthrough on this post to create the expression on the 2nd drop down list which I was hoping would automatically display the 3rd column information (course titles) in the 3rd field when the 1st and 2nd fields are completed.

    http://social.msdn.microsoft.com/Forums/eu/sharepointinfopath/thread/4a50ea94-c980-40c2-82b3-4def6bef25fe

    But nothing happens when I preview.

    I feel like I'm so close - I'm just missing something obvious.

    I attached my form.  I'm not sure if you can see what you need to see without the data source?  Hopefully you can.

  • 04-04-2012 02:12 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    When Position Title changes, you are setting the main data souce CourseTitle field to itself?

    Instead, you will want to set it to the secondary data source field that contains the correct course title.

    But, when I look at your secondary data sources, neither of them include the CourseTitle? Is that in the Training 2012 List? Walk through the data connection again, and include all the fields you need - Title, PositionLevel and CourseTitle. You only need one data connection to this list, it can be used for both drop downs.

    Hilary Stoupa

  • 04-05-2012 12:52 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    I AM getting closer!

    I have cleaned up my data sources.  I have one secondary data source now and it contains all 3 fields.  Thanks!

    I figured out that "Business Unit" was sometimes called "Title" in my formulas, and this was causing formula errors.  So in my data source, I created a new column for that data called "Business Unit 2."  This provided a bit of a breakthrough.

    Now, I have my 2 dropdowns working great.  I have a rule on the 2nd dropdown which prompts data to display in the 3rd field.

    However, it seems to only display one result, not *all* results that match the selected business unit and position level.

    What should I do now? (form attached.)

    I don't know why you are so kind to help people like me, but I sure appreciate it!

  • 04-05-2012 02:20 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    I learned InfoPath using this forum. It is nice to be able to help others who are learning.

    So, initially, you'd not mentioned that you needed to see multiple course titles. Is this data just going to be displayed? Or do you need an actual value in the field CourseTitle?

    If just displayed, we can show your secondary data connection on the form with some filtering - if you need to set the field's value, we'll have to use a double eval formula to concatenate all the values. Does that make sense?

    This is a SharePoint List form - so we can't have the course title field be repeating, like we might in a normal InfoPath form.

    Hilary Stoupa

  • 04-06-2012 12:04 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    Yes, just display - nothing fancy.  You lost me at "double eval formula to concencate all the values" - is it easy?

    Someday I hope I will know enough to be able to return the good karma to others!  Thanks. :)

  • 04-06-2012 12:22 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    If you simply want to display the course titles in the form, the attached template may do what you want - it uses a repeating section bound to your secondary data connection. To try it, save it locally, right click the file and select design to open in design mode. In case this isn't quite what you want - it will show in the list form only, but won't be saved in the list - I'll post another sample here in a minute with another option.

    Hilary Stoupa

  • 04-06-2012 12:28 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    Here it is again with an attempt at a filtered double eval formula for the default value for course title - since I can't preveiw, I'm sort of guessing on both of these - the one above has a formatting rule on the repeating section, by the way - this one has a default value for CourseTitle.

    Hilary Stoupa

  • 04-06-2012 12:31 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    Oh my goodness I think it's doing what I need!!  But what did you do to the course title field to make it concatenate?  Where can I see the formula? Or is it just a matter of making it a repeating section?  Because if it were that easy I'd be one happy camper.

  • 04-06-2012 12:44 PM In reply to

    Re: Display filtered information based on selections on 2 drop-down menus

    Which one of the two does what you need?

    In the first one, there is a repeating section bound to the secondary data source - and it has conditional formatting to hopefully only display the correct data from that data source.

    In the second one, I set the CourseTitle to have a default value - it uses a double eval formula - they are little complicated to get the hang of, but I always go to this blog post for the syntax: http://blogs.msdn.com/b/infopath/archive/2006/04/05/569338.aspx

    Hilary Stoupa

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