<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>How to set field value in InfoPath Form associated to the person who will open this form</title><link>https://www.infopathdev.com:443/forums/thread/94387.aspx</link><pubDate>Tue, 19 Nov 2013 20:25:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94387</guid><dc:creator>micvida</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94387.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=94387</wfw:commentRss><description>Hi All 
I am new to this site and I am seeking help with my issue, I am really struggling below the scenario:
I am designing InfoPath Form addressed to be a leave form for the company employees 

1- I created first section containing the Employee Info (Login ID, Name , Manager Name , title and department) all this information was set successfully to be filled Automatically once the Employee open the form using getUserProfileByName Data Connection 

2- I created a list on Sharepoint containing the fields (total Days Balance , Required Days , New Days Balance) and added a Data Connection to my form for that list

3- I have second section on the form with three fields (Total Days Balance , New Days Balance, Employee Name ) I need once the employee opens the form the total Days Balance gets the value from that list , I set query data connection then set value of that TotalDaysBalace to get the value from that list , but the issue that it takes only the first value related to first employee in that SharePoint list , how I can set that value (totalDaysBalance) to be pulled from the corresponding value to same employee who opens the form??
and the same to calculate the new balance days in the form by subtracting it from the required days and update it in that same list 

Please Note Employee Name , Total Days Balance will be filled manually in the SP list but New Balance to be updated once the form is submitted 

thanks in advance for any help</description></item></channel></rss>