Skip to main content

Filtering SharePoint List Data using Infopath 2010

I could have just added the Account field to the Custom List data source (and I did that, from Tools > Data Connections) and used that instead of the Name field, but people usually don't know their managers' account names. I did a little digging and found an MSDN forum post that gave me a great way to let users pick friendly display names, which InfoPath would then use to populate a hidden form field with the corresponding account name

  1. Add a Text Box field to the InfoPath form (Insert > Text Box).
  2. Right-click the text box and choose Text Box Properties.
  3. On the Data tab, click the Function (fx) button in the Default Value section.
  4. Click the Insert Field or Group... button.
  5. In the Data source drop-down list, select Your Custom List.
  6. Expand the folders until you see the fields in the User Information List.
  7. Click the :Account field (you did add it from Tools > Data Connections > Modify, right?), and then click Filter Data.
  8. In the Filter Data box, click Add.
  9. In the Specify Filter Conditions box, select Name in the first field, is equal to in the criteria field, and Select a field or group in the third field.
  10. In the Select a Field or Group box, change the Data source to Main (this is your InfoPath form fields).
  11. Click the field that contains the drop-down list of display names you created earlier, and then click OK.
  12. Click OK in all the dialog boxes (shown below) to return to the Text Box Properties.







Hiding Form Controls

I wanted the field hidden, since users didn't need to see it, so back in my Text Box Properties:
  1. In the Display tab, click Conditional Formatting.
  2. In the Conditional Formatting box, click Add...
  3. In the condition builder section, leave the field name selected in the first box, and then select is present in the criteria box.
  4. Check the box Hide this control, and then click OK.
  5. Click OK to return to the Text Box Properties, and then click OK to save

Click Preview one more time to make sure I can't see the field containing the account name anymore - success! Finally, I walked through the File > Publish wizard one last time, making sure to add my new hidden Text Box field to the list of fields to publish, and I was ready to go. Users could create their expense reports in a Forms Library;

Comments

  1. this is a good idea. I am trying to figure out how to implement this in a way that I can filter a sharepoint list based on user entry. then populate a dropdown based on that filtered source. Any suggestions?

    ReplyDelete
  2. Right here is the right web site for anybody who would like to find
    out about this topic. You realize a whole lot its almost tough to argue with you (not
    that I actually will need to…HaHa). You certainly put a fresh spin on a topic that has
    been discussed for ages. Great stuff, just wonderful!
    my website: diet that works

    ReplyDelete
  3. Wonderful blog уou havе herе but І was wanting to know if you knew of any discussion boards that cover the same topiсs tаlked about in
    this аrtіcle? I'd really love to be a part of community where I can get comments from other experienced people that share the same interest. If you have any suggestions, please let me know. Bless you!

    Here is my web blog: en yeni oyunlar

    ReplyDelete
  4. Υou reаlly mаke іt ѕeеm sо easy ωith youг pгesеntation but I find this mаtter to be really
    sοmethіng that I thіnk I would neѵer understanԁ.
    It seemѕ too complicated аnd veгy broаd for
    mе. I'm looking forward for your next post, I will try to get the hang of it!

    My blog :: bulma oyunları

    ReplyDelete
  5. Very nice post. I just stumbled upon your weblog and wanted tο mention that I have reallу enjoyeԁ
    suгfing агound yоuг blοg posts.
    In any case Ι'll be subscribing for your rss feed and I hope you write once more soon!

    my homepage :: ev oyunları

    ReplyDelete

Post a Comment

Popular posts from this blog

Tab Control in Asp.Net

Scenerio: I need your help in designing tab control in   asp.net .My requirement is I need a tab control in   asp.net (C#) like  for example goto my computer ,right click c drive and select properties.we get tabs like general,security etc....... like that i need to design one tab control(no need of any rightclick) in my web page and the database table columns should come as tabs and inseide the tab data of that particular column should come.   Example:Employee master tab1:Employee name.........his name in the tab tab2:Age.............his age tab3:Address........his address   Solution:   You can do this using a simple div <style type="text/css"> .tabs         {             position: relative;             height: 20px;             margin: 0;   ...

AI and Microsoft: Revolutionizing Efficiency in Nonprofit Organizations

  How AI and Microsoft Enhance Efficiency in Nonprofit Organizations In today’s fast-paced world, nonprofit organizations face unique challenges—limited resources, increasing demands, and the constant need to do more with less. But what if technology could be the game-changer they need? In my latest research paper,  "How AI and Microsoft Enhance Efficiency in Nonprofit Organizations" , I explore how cutting-edge technologies like Artificial Intelligence (AI) and Microsoft’s innovative tools are revolutionizing the way nonprofits operate. From streamlining administrative tasks to enhancing donor engagement and optimizing resource allocation, AI and Microsoft’s solutions are empowering nonprofits to focus on what truly matters—their mission. This paper dives deep into real-world examples, practical applications, and the transformative potential of these technologies. Whether you’re a nonprofit professional, a tech enthusiast, or simply curious about the intersection of technolo...

Social tagging overview in Sharepoint 2010

A tag is a word or phrase that identifies an individual piece of information according to a set of attributes or criteria. Tags make it easy to find and share information about a specific subject or task. Social tagging helps users categorize information in ways that are meaningful to them. Social tagging can improve the quality of search results by filtering against specific tags, and it can also connect individuals who want to share information with other users who have like interests. This article describes the social tagging features in Microsoft SharePoint Server 2010. This article does not describe how to configure social tagging features. It also does not discuss how to implement social tagging features as part of an overall social media strategy for an enterprise. About using social tagging features Social tagging features help users to share information and to retrieve relevant, high-quality content more efficiently. Such sharing encourages collaboration and b...