<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/77864.aspx</link><pubDate>Mon, 23 Apr 2012 16:14:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77864</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77864.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=77864</wfw:commentRss><description>&lt;p&gt;Sounds like your situation may be different - this is a pretty old thread. You may want to create a new post with more details on what you are trying to do.&lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/77836.aspx</link><pubDate>Mon, 23 Apr 2012 07:29:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77836</guid><dc:creator>anilh_chavan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77836.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=77836</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi, &lt;/p&gt;&lt;p&gt;To get the current&amp;nbsp;user&amp;#39;s information(Mail ID), I&amp;#39;m simply&amp;nbsp;using Value[Name = &amp;quot;WorkEmail&amp;quot;] according to your post i had followed all steps and on Submit buttons properties rule i just want to insert values in database through web service.But it cant work, it works when i use infopath form in preview mode.&lt;/p&gt;&lt;p&gt;Thanks in advance for any help.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt; &amp;nbsp; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/54168.aspx</link><pubDate>Mon, 26 Apr 2010 15:58:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54168</guid><dc:creator>texastwo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54168.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=54168</wfw:commentRss><description>&lt;p&gt;The standard formulas in infopath&amp;nbsp;dont seem to support if/then&amp;nbsp;?&lt;/p&gt;
&lt;p&gt;If (@Available[@ID = countfrom]=1) else (countfrom - 1) how might you suggest creating this?&lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/30031.aspx</link><pubDate>Wed, 02 Jul 2008 13:49:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30031</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30031.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=30031</wfw:commentRss><description>&lt;p&gt;I guess my real concern with this scenario is whether the queries that pull the data for the GUPBN connection are run automatically when the form is opened, and what then loads up the fields with the user information in your form. If the queries run automatically, and there is nothing in place from preventing another person who opens the form from triggering any rules that fill the fields you are using, you could run into exactly that situation. Give it a thorough test, and maybe think about using conditional formatting to make some controls read only after their initial values are filled to prevent these types of situations. &lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29991.aspx</link><pubDate>Tue, 01 Jul 2008 19:21:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29991</guid><dc:creator>gschwendt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29991.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29991</wfw:commentRss><description>&lt;p&gt;OK! I think I have something working now. Tell me if you can think of any obstacles I could run into. &lt;/p&gt;
&lt;p&gt;After reading through the comments of blog post you linked earlier, I saw someone suggest creating a second GUPBN data source, titled GUPBNMGR, then assigning the AccountName of that data source to the username of the manager. &lt;/p&gt;
&lt;p&gt;Using what you recommended above about setting a rule to assign the AccountName and then submit the query, I created a rule on the Submittor&amp;#39;s (current user from GUPBN) name that when it&amp;#39;s filled, it would assign the AccountName of the GUPBNMGR to be the approving_mgrusername, then submit the query. I then tied the approving_mgremail to the WorkEmail of the GUPBNMGR and voila! It retains my current user&amp;#39;s info and as well pulls the manager&amp;#39;s information. &lt;/p&gt;
&lt;p&gt;The question I suppose I need to ask, is there ever a time when the rule tied to the Submittor&amp;#39;s name would be re-ran. Meaning if a second user opens the form for review, would it pull in that 2nd user&amp;#39;s manager name and replace the original submittor&amp;#39;s manager name? I can test this obviously but also curious if you could foresee any&amp;nbsp;other gotchas I should look out for. &lt;/p&gt;
&lt;p&gt;Thanks for all of your help. I&amp;#39;m sure I&amp;#39;ll have more questions as I continue to develop this but for now I&amp;#39;m at least on the right path (I think). &lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29989.aspx</link><pubDate>Tue, 01 Jul 2008 18:39:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29989</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29989.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29989</wfw:commentRss><description>&lt;p&gt;From the little I&amp;#39;ve read on the GetUserProfileByName datasource, when it is first configured if you don&amp;#39;t change the defaults for the parameters (that is, if the Account Name in the query fields is blank), it will, by default, return the current user&amp;#39;s information. Your issue is that once you have that current user&amp;#39;s information, you&amp;#39;d like to get the same information (well, at least some of the same information, the email address) for a different user. &lt;/p&gt;
&lt;p&gt;The filter scenario won&amp;#39;t work, because those data fields currently only hold information about the currrent user. &lt;/p&gt;
&lt;p&gt;To demonstrate what I mean, try this. Put a button on your form. Right click and in the button properties, go into rules. For your first rule, set a field&amp;#39;s value and set the query field account name in your GUPBN datasource to the value in your approving_mgrusername field. For your second rule, run a query, and select the GUPBN datasource. Drag the entire PropertyData group in the data fields for the GUPBN somewhere on your form (doesn&amp;#39;t matter if it is ugly, we just want to see the values). Then preview your form. When you first see it, I&amp;#39;m guessing the PropertyData stuff will relate to the current user. Then click your button with the rules connected, after making sure that you have a user name in approving_mgrusername that is different from the current user. &lt;/p&gt;
&lt;p&gt;I&amp;#39;m going to be travelling this afternoon, so I won&amp;#39;t be around, but I&amp;#39;ll check back later today or early tomorrow, so please do post if you have trouble.&lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29988.aspx</link><pubDate>Tue, 01 Jul 2008 18:17:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29988</guid><dc:creator>gschwendt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29988.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29988</wfw:commentRss><description>&lt;p&gt;To get the current&amp;nbsp;user&amp;#39;s information, I&amp;#39;m simply&amp;nbsp;using text boxes with the default fields set to something similar to these (depending on the field)&lt;/p&gt;
&lt;p&gt;Value[Name = &amp;quot;AccountName&amp;quot;]&lt;br /&gt;Value[Name = &amp;quot;WorkEmail&amp;quot;]&lt;br /&gt;Value[Name = &amp;quot;Manager&amp;quot;]&lt;br /&gt;Value[Name = &amp;quot;SPS-Dotted-line&amp;quot;]&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Here are the steps I&amp;#39;m following to try to pull the manager&amp;#39;s information&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Insert Formula for the default value&amp;nbsp;of &amp;quot;approving_mgremail&amp;quot; field&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Click Insert Field or Group...&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select the GetUserProfileByName data source from the drop box which gives me this image (with categories expanded)&lt;br /&gt;&lt;img src="http://gschwendt.googlepages.com/SelectFieldorGroup.jpg" alt="" /&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;I highlight the Value field above, then click the Filter Data button.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;For the filter data, I use the following information&lt;br /&gt;&lt;img src="http://gschwendt.googlepages.com/filterconditionaccountnameandworkema.jpg" alt="" /&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Which gives me this resulting formula: &lt;br /&gt;Value[AccountName = approving_mgrusername and Name = &amp;quot;WorkEmail&amp;quot;]&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;approving_mgrusername is currently just a static username but will eventually house the calculation discussed earlier that&amp;nbsp;determines if SPS-Dotted-line field is blank or not.&amp;nbsp;This returns a blank value so obviously I&amp;#39;m doing something wrong. I came up with this formula because for the current user WorkEmail, you use this Name&amp;nbsp;| is equal to&amp;nbsp;| &amp;quot;WorkEmail&amp;quot; filter.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Let me know anything more you need to see or have described in order&amp;nbsp;to help. I greatly appreciate all the help you&amp;#39;ve given me so far and especially the quick responses.&lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29982.aspx</link><pubDate>Tue, 01 Jul 2008 17:03:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29982</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29982.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29982</wfw:commentRss><description>&lt;p&gt;Got it. So, can you tell me how you are getting your user information the first time through? Are you running&amp;nbsp; a query when the form loads, or when a field changes, or ... ?&lt;/p&gt;
&lt;p&gt;Basically, what you will need to do is (after you have gotten all the user info you need from the data fields in your GetUserProfileByName data source) set the correct query field to either the dotted line or direct manager and then run the query. This can be done with rules or code. If you are uncertain which query field to set, expand the query fields folder in the data source in the task pane, take a screen shot and post it and I&amp;#39;ll see if I can help you figure it out.... &lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29981.aspx</link><pubDate>Tue, 01 Jul 2008 16:25:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29981</guid><dc:creator>gschwendt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29981.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29981</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Hilary Stoupa:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;I may be starting to get this, sorry to be so slow! What you are getting from GetUserProfileByName is all your current user info, right? and you need to basically query the same web service again with the name of the manager to get the info for the manager? &lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;Exactly! But one thing to note, it won&amp;#39;t necessarily always be the direct manager, it could also be the SPS-Dotted-line manager. Basically if they have a Dotted-line manager, I want it to use that first, if it&amp;#39;s blank, then use the manager (hence my 1st question in the&amp;nbsp;initial post).</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29980.aspx</link><pubDate>Tue, 01 Jul 2008 16:22:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29980</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29980.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29980</wfw:commentRss><description>&lt;p&gt;I may be starting to get this, sorry to be so slow! What you are getting from GetUserProfileByName is all your current user info, right? and you need to basically query the same web service again with the name of the manager to get the info for the manager? &lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29979.aspx</link><pubDate>Tue, 01 Jul 2008 16:15:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29979</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29979.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29979</wfw:commentRss><description>&lt;p&gt;I think some screen shots would really help -- I can&amp;#39;t quite visualize what you are doing and I haven&amp;#39;t used GetUserProfileByName, so I am unfamiliar. Also, I found a blog post that may be helpful to you: &lt;a href="http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx"&gt;http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29976.aspx</link><pubDate>Tue, 01 Jul 2008 15:59:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29976</guid><dc:creator>gschwendt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29976.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29976</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Hilary Stoupa:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;I see. Yes, you probably have a filter issue. Let&amp;#39;s say you want to put the manager email into field1 in your form and that the current username is in field2. Right click field1, select properties, and in the default value field select the formula button. Then, in the Insert Formula window, select the Insert Field or Group button. The Insert Field or Group window opens. In the dropdown for data source, select your SharePoint data source. Select the field that has the manager email, then select the filter button from the lower left corner. For the first dropdown, select the submittor username from the&amp;nbsp;SharePoint data source, the second dropdown should be &amp;quot;is equal to&amp;quot; and in the third, select&amp;nbsp;field2 from your main data source (where the current username is).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;If I understand what you&amp;#39;re saying correctly, you&amp;#39;re referring to if I&amp;#39;m pulling the manager information from a Sharepoint list, correct? I&amp;#39;m hoping to pull it from the GetUserProfileByName data source. If I&amp;#39;m mistaken, certainly let me know but also I suppose I need a bit more information because I don&amp;#39;t quite follow. This is what I have, tell me if it makes much sense or not. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Value[AccountName = Requestor_SPS-Dotted-line and Name = &amp;quot;WorkEmail&amp;quot;]&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Basically what I&amp;#39;m saying is that I want to return the Value of &amp;quot;WorkEmail&amp;quot; for the username found in Requestor_SPS-Dotted-line. Sorry if I&amp;#39;m not making much sense... I can provide screenshots or&amp;nbsp;detailed instructions on what I&amp;#39;m doing&amp;nbsp;if it would be of any help. &lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29972.aspx</link><pubDate>Tue, 01 Jul 2008 15:20:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29972</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29972.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29972</wfw:commentRss><description>&lt;p&gt;I see. Yes, you probably have a filter issue. Let&amp;#39;s say you want to put the manager email into field1 in your form and that the current username is in field2. Right click field1, select properties, and in the default value field select the formula button. Then, in the Insert Formula window, select the Insert Field or Group button. The Insert Field or Group window opens. In the dropdown for data source, select your SharePoint data source. Select the field that has the manager email, then select the filter button from the lower left corner. For the first dropdown, select the submittor username from the&amp;nbsp;SharePoint data source, the second dropdown should be &amp;quot;is equal to&amp;quot; and in the third, select&amp;nbsp;field2 from your main data source (where the current username is).&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29966.aspx</link><pubDate>Tue, 01 Jul 2008 14:29:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29966</guid><dc:creator>gschwendt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29966.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29966</wfw:commentRss><description>Thanks... at first glance I think I follow the logic fairly well but if I run into any issues implementing it I&amp;#39;ll come back and let you know. 
&lt;p&gt;&amp;nbsp;As for question 2, basically for the submittor of the form, I&amp;#39;m pulling their user information from Sharepoint (username, workemail, firstname, lastname, manager (username), sps-dotted-line (username), etc.) I&amp;#39;m wanting to use the Sharepoint datasource connection to also look up the user information for the submittor&amp;#39;s manager, so it would look something like this: 
&lt;p&gt;submittor username: domain\johndoe&lt;br /&gt;submittor workemail: &lt;a href="mailto:john.doe@domain.com"&gt;john.doe@domain.com&lt;/a&gt;&lt;br /&gt;submittor firstname: john&lt;br /&gt;submittor lastname: doe&lt;br /&gt;submittor manager: domain\janedoe&lt;br /&gt;submittor sps-dotted-line: domain\jimmydoe 
&lt;p&gt;manager username: domain\janedoe&lt;br /&gt;manager workemail: &lt;a href="mailto:jane.doe@domain.com"&gt;jane.doe@domain.com&lt;/a&gt;&lt;br /&gt;manager firstname: jane&lt;br /&gt;manager lastname: doe 
&lt;p&gt;&amp;nbsp;The submittor information is already being pulled in automatically because it defualts to &amp;quot;current user&amp;quot;, but I want to pull in the manager information. I assume it somehow uses the filter when filling in the field with the secondary data source but I can&amp;#39;t quite follow the proper logic to get it done... assuming I&amp;#39;m even doing it the right way.&lt;/p&gt;</description></item><item><title>Re: Questions: If/then in default value and AD username lookup</title><link>https://www.infopathdev.com:443/forums/thread/29945.aspx</link><pubDate>Mon, 30 Jun 2008 23:57:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29945</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29945.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29945</wfw:commentRss><description>&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I don&amp;#39;t quite understand question 2, but have a suggestion for question 1. I have used &amp;#39;method 2&amp;#39; from this post with success for a conditional default value for a field: &lt;a href="http://blogs.msdn.com/infopath/archive/2006/11/27/conditional-default-values.aspx"&gt;http://blogs.msdn.com/infopath/archive/2006/11/27/conditional-default-values.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The basic structure of the formula they suggest looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;concat(&lt;br /&gt;substring(TrueResult, 1, (BoolCondition) * string-length(TrueResult)),&lt;br /&gt;substring(ElseResult, 1, (not(BoolCondition)) * string-length(ElseResult))) &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;What this formula does is concatenate two substrings. Depending on the result of the boolean (true/false) condition, one of the substrings won&amp;#39;t return any characters and the other will return all of it&amp;#39;s characters. Let&amp;#39;s say you have a form with a very simple schema -- textField, textField1 and textField2. If textField is blank, you would like textField2 to default to textField1. If textField has a value, though, textField2 should default to that. First you would right click on textField2 and select properties, then in the default value section, select the formula button.&amp;nbsp;Using the above formula, the logic for this scenario would look like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;concat(&lt;br /&gt;substring(textField, 1, not(textField = &amp;quot;&amp;quot;) * string-length(textField)), &lt;br /&gt;substring(textField1, 1, (textField = &amp;quot;&amp;quot;) * string-length(textField1)))&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Let me know if you need further explanation for this, as I know I found the formula a bit confusing the first few times I worked with it.&lt;/p&gt;</description></item></channel></rss>