Filtering Forms - InfoPath Dev
in

InfoPath Dev

Filtering Forms

Last post 07-23-2010 08:04 AM by mgarant. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-23-2010 05:45 AM

    • fcsech
    • Not Ranked
    • Joined on 07-15-2010
    • Posts 6

    Filtering Forms

    Hi everybody, i've run into a roadblock and need some help. Here's the situation, I created a form in Infopath and have everything working pretty good there. When a form is submitted it is sorted by "Clinician" (the person's name) in sharepoint. My problem is that their are several clinicians and I want to filter the data so they only see the forms that pertain to them. I can't filter with "created by" becuase the clinician will not always be the person entering and submiting the form.

    I've tried filtering the view by using "Clinician" is equal to [Me] but get "filter is not a valid text string". I've also tried filtering by "Name", but i get a "render failed" message. 

     

    Here's a Screen shot, all I want to do is when Lee Westwood is logged in, I want him to see only Lee Westwood forms.




    Thanks Again


     

     

     

     


  • 07-23-2010 06:41 AM In reply to

    You will need to add a column to your sharepoint list, type : people. That is the only way to add the filter on [Me] because [Me] is of people type. If you set this value with the good format of name (like Smith, Robert for instance) it should recognize the person.

    Hope that helps

  • 07-23-2010 07:00 AM In reply to

    • fcsech
    • Not Ranked
    • Joined on 07-15-2010
    • Posts 6

     I created the column, but im confused on how you would get the person's name typed/submitted in the infopath form into the "people" column.

  • 07-23-2010 07:06 AM In reply to

    In your form, add a hidden field that you will publish. Set the default value of this field to concat(Last name, ", ", First Name). I don't know if it will work though... if it doesn't, maybe you could try to add a field to your form that the user can fill with the username of the clinician (something like domain\rsmith) or with his email.

  • 07-23-2010 07:41 AM In reply to

    • fcsech
    • Not Ranked
    • Joined on 07-15-2010
    • Posts 6

     Thanks for you help, I tried your 2 solutions but no success. The frustrating part is I created a new field called username, but in Sharepoint it will not let me filter by this:


    None Checked Out To Clinician Comments Content Type Copy Source Created Created By Cred Earned Date ID Modified Modified By Modifier Name People Programs Subtotal Title Username Version


    is equal to is not equal to is greater than is less than is greater than or equal to is less than or equal to begins with contains


    fld = new AddFilterFields(g_FieldType[GetSelectedValue(document.forms[MSOWebPartPageFormName].FieldPicker1)], "CompareWithValue1", "[Me]");

     

     ^That was suppose to be a table, but its "Username" is equal to [Me]

    Pretty much the only time i can filter is when its created by, but i cannot use that!!! All i want to do is filter by sharepoint username!

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