<?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>Re: Conditional Default using xPath   ("or" in a boolean)</title><link>https://www.infopathdev.com:443/forums/thread/122375.aspx</link><pubDate>Mon, 10 Feb 2020 13:50:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:122375</guid><dc:creator>granDelimiter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/122375.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=122375</wfw:commentRss><description>slight modification needed: A form load rule sets the value to &amp;#39;supervisor&amp;#39; if preferredName is SupervisorA or SupervisorB  or SupervisorC, and otherwise the control&amp;#39;s default value sets it to &amp;#39;technician&amp;#39;.
In retrospect, I may go back to manual entry just for stability and simplicity given the minimal extra convenience automation gave</description></item><item><title>Re: Conditional Default using xPath   ("or" in a boolean)</title><link>https://www.infopathdev.com:443/forums/thread/122367.aspx</link><pubDate>Sun, 09 Feb 2020 00:34:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:122367</guid><dc:creator>granDelimiter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/122367.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=122367</wfw:commentRss><description>OK, here&amp;#39;s what will work:
Set the field&amp;#39;s value in infoPath rules (which allow &amp;quot;If a and If b ...&amp;quot; etc), but have one of the conditions be &amp;quot;if the field is blank&amp;quot;. That is the equivalent of setting a default for the field.
I never would have thought of it without your help.
gran</description></item><item><title>Re: Conditional Default using xPath   ("or" in a boolean)</title><link>https://www.infopathdev.com:443/forums/thread/122366.aspx</link><pubDate>Sat, 08 Feb 2020 22:51:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:122366</guid><dc:creator>granDelimiter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/122366.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=122366</wfw:commentRss><description>Thanks,
I see how an outside list with all personnel and their roles would work. However I don&amp;#39;t have a list of all technicians. I only know who the supervisors are. So I still need a function for &amp;quot;IF( A or B or C..)&amp;quot; or &amp;quot;IF(A in (B,C,D))&amp;quot;. The rules in infopath could use something like that to change a field, but not to set its default.
For our purposes, for now at least, its probably prudent to just require users to enter their position.</description></item><item><title>Re: Conditional Default using xPath   ("or" in a boolean)</title><link>https://www.infopathdev.com:443/forums/thread/122364.aspx</link><pubDate>Fri, 07 Feb 2020 23:42:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:122364</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/122364.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=122364</wfw:commentRss><description>&lt;p&gt;I would probably get all of this outside of the form / list and into its own list. Like - a list that has two columns, one for &amp;quot;Role&amp;quot; (string or choice) and one for &amp;quot;Person&amp;quot; (person or group). You&amp;#39;d have entries like:&lt;/p&gt;

&lt;table&gt;

&lt;tr&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Person&lt;/th&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;Supervisor&lt;/td&gt;

&lt;td&gt;Jane Doe&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;Technician&lt;/td&gt;

&lt;td&gt;John Smith&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;Technician&lt;/td&gt;

&lt;td&gt;Sue Jones&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;Supervisor&lt;/td&gt;

&lt;td&gt;Bob Roe&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;

&lt;p&gt;Then, in your form, instead of having to do this kind of conditional logic, you could simply compare to the Role in the list. I&amp;#39;m not quite sure I understand how you are using this default - but if you can take a more data-driven approach, you won&amp;#39;t have to deal with this sort of work-around.&lt;/p&gt;</description></item><item><title>Conditional Default using xPath   ("or" in a boolean)</title><link>https://www.infopathdev.com:443/forums/thread/122352.aspx</link><pubDate>Fri, 07 Feb 2020 15:57:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:122352</guid><dc:creator>granDelimiter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/122352.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=122352</wfw:commentRss><description>In infoPath I have for the default of a field; xpath for If me - &amp;quot;string1&amp;quot; else - &amp;quot;string 2&amp;quot;. Here it is:
concat(substring(&amp;quot;Supervisor&amp;quot;, 1, (../my:preferredName = &amp;quot;myName&amp;quot;) * string-length(&amp;quot;Supervisor&amp;quot;)), substring(&amp;quot;Technician&amp;quot;, 1, (not(../my:preferredName = &amp;quot;myName&amp;quot;)) * string-length(&amp;quot;Technician&amp;quot;))).   I want to cover all the supervisors, so &amp;quot;myName&amp;quot; or &amp;quot;hisName&amp;quot; or &amp;quot;herName&amp;quot;. When I try just using &amp;quot;or&amp;quot; and adding names like that it stops working. It gets put in without error messages but it spits out &amp;quot;Supervisor&amp;quot; even if I misspell all the names.
Any way to get an &amp;quot;or&amp;quot; statement into a boolean in xpath?
Thanks
p.s. I think I have a work-around using a sharePoint calculated column to get a default value (sharepoint calculations are easier), but it seem resource-heavy (a whole extra column, recalculated every log on).
p.p.s This work-around is not working either.</description></item></channel></rss>