username() function - InfoPath Dev
in

InfoPath Dev

username() function

Last post 12-03-2010 12:49 AM by Patrick Halstead. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 11-24-2010 12:42 PM

    username() function

    Someone has already created a few forms before I joined and I am trying to troubleshoot 1)In a form called Form1,When I look into the Text Box properties of "Form1_userAlias", its default Value is set to userName().......................... what information is collected by a username function, with open and closed brackets ? 2) Also, Can someone explain what is the net effect of the steps below............................ When I go into a Rule, there is an action which has a field "Form1_assignedto_Form4" and Value as @Name [Form1_userAlias=@alias] This is urgent, please help PS: Sorry for the double post. Not really sure which forum this question is apt for!!
  • 11-24-2010 01:17 PM In reply to

     

    Hi, username() function allow to display the local user of the current windows session. For your rules :@Name [Form1_userAlias=@alias], it's probably set the name of the current login.
  • 11-29-2010 07:59 AM In reply to

     thank you so much

    Would that be the login of the sharepoint login or the windows session? 

  • 11-29-2010 03:50 PM In reply to

     

    Hi, it's the login of the windows session.
  • 11-30-2010 08:02 AM In reply to

    thank you so much..this has been really helpful One more question : what does the @ symbol do in the above formulas For example if there is an action which has a field "Form1_assignedto_Form4" and Value as @Name [Form1_userAlias=@alias]. Can you explain in layman language what is happening and what exactyl is the @ symbol doing in this case?
  • 11-30-2010 08:11 AM In reply to

    Never mind, as soon as I posted this question: I found the information here http://www.infopathdev.com/forums/p/12461/43798.aspx
  • 11-30-2010 08:19 AM In reply to

    Although, the above post is useful, a layman explanation will be useful Previous designer has set up complex functions in the form such as the one below below : It goes @D_Title[@Time_Stamp = Y_timeStamp and @User_Alias = Y_userAlias] What does this mean?
  • 11-30-2010 08:48 AM In reply to

    Hey there -- everything in the square brackets ( [ ] ) is an XPath filter.

    I don't know if it will help, but here is how I think of those filters. Our data source could have many rows of data. We want information from one of them. Everything in the [ ] are our instructions to InfoPath for how to find the right row.

    In the case above, the formula is saying:

    Give me the D_Title field where the Time_Stamp is the same as this other data source time stamp, and User_Alias is the same as this other data source user alias.

    In the formula editor, if you check the Edit XPath box, you'll see the full XPath, which can quickly show you what data sources are involved....Or, in the formula editor, highlight the whole mess and click the Insert Field or Group button. This should open another dialog with the field (D_Title) already selected. You can then click the filter button to see what filters have been applied.

    Hilary Stoupa

  • 12-02-2010 11:50 AM In reply to

    This question is in response to Potemkine in the thread above. can you please share what function can I use so that this can be set to collect the SharePoint login instead of the windows login session. Thanks for all the help. You guys are all a great help.
  • 12-03-2010 12:49 AM In reply to

    Clayton Cobb's blog has a nice example of calling GetUserProfileName. Just Google Clayton Cobb's SharePoint Madness and it should come up.

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