Take results of Username() function and perform a lookup on a list - InfoPath Dev
in

InfoPath Dev

Take results of Username() function and perform a lookup on a list

Last post 06-26-2011 04:31 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-20-2011 09:29 AM

    Take results of Username() function and perform a lookup on a list

    Ideally I would like to have the form load, pull the Username() and perform a lookup against a SharePoint list of usernames.  If the particular username does not exist then switch the view to a read-only view.  I can get the Username() function to work and pull in the credentials but when I try and perform a lookup against the list I feel I am leaving somethig out.  The expected behavoir is to NOT have the views switch (I am in the user list) but everytime it loads I end up with the read only view.
  • 06-26-2011 04:31 PM In reply to

    Re: Take results of Username() function and perform a lookup on a list

    Hi Putnamsam!

    I'm guessing that you have a SharePoint list with usernames in it and that you have a data connection that loads that list on open. Make sure the data connection is set to load on open.

    Do you set the username to a field on your data source or are you just using the username function in your rule? 

    To debug your form load rule, I suggest adding dialog popups. Who knows, could be a case sensitivity issue. Don't forget that xpath is case sensitive so if those usernames in your sharepoint list aren't all in lowercase, your comparison will fail.

    Best of luck!

    PS> how bout them Seahawks?

     

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.