<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: OnLoad Event</title><link>https://www.infopathdev.com:443/forums/thread/13599.aspx</link><pubDate>Thu, 15 Sep 2005 14:16:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13599</guid><dc:creator>drobins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13599.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13599</wfw:commentRss><description>The more I learn the better.&lt;br /&gt;&lt;br /&gt;Again i was able to use rules with the open/save options rather than add fields.&lt;br /&gt;&lt;br /&gt;And now that I can get the users username I can apply a little bit of security to the form rather than using a hidden field that has had its value changed by a submit button&lt;br /&gt;&lt;br /&gt;thanks guys!</description></item><item><title>Re: OnLoad Event</title><link>https://www.infopathdev.com:443/forums/thread/13598.aspx</link><pubDate>Thu, 15 Sep 2005 06:01:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13598</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13598.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13598</wfw:commentRss><description>I agree with VT, use a secondary data source for presentation stuff. Otherwise the data sanctity of the XML form is compromised.&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: OnLoad Event</title><link>https://www.infopathdev.com:443/forums/thread/13597.aspx</link><pubDate>Tue, 13 Sep 2005 18:41:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13597</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13597.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13597</wfw:commentRss><description>If field7 in your case was name something like "readonly" and is of boolean type I think what you are doing makes sense.  &lt;br /&gt;&lt;br /&gt;To play devil's advocate, creating a field in a schema for the sole purpose presentation may not be best.  If the presentation can be determined from the state of the data in the form some developers would consider it better design to use xdExtension because no additional fields would have to be created.  The reason why is if the XML schema for your InfoPath has business data and then there are InfoPath related elements in your schema, it will not integrate well with other layers of an enterprise solution.  This is just a constructive comment I would give if I were doing a peer review with another developer.</description></item><item><title>Re: OnLoad Event</title><link>https://www.infopathdev.com:443/forums/thread/13596.aspx</link><pubDate>Tue, 13 Sep 2005 17:57:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13596</guid><dc:creator>drobins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13596.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13596</wfw:commentRss><description>I was actually able to do it without using the xdExtension, although its probably more coding than needed.&lt;br /&gt;&lt;br /&gt;dim f6&lt;br /&gt;f6 = XDocument.DOM.selectSingleNode("//my:myFields/my:field6").text&lt;br /&gt;if f6 = "true" then&lt;br /&gt;XDocument.DOM.selectSingleNode("//my:myFields/my:field7").text = f6&lt;br /&gt;end if&lt;br /&gt;&lt;br /&gt;grab the value of field6.&lt;br /&gt;if it is true then set field7 to true.&lt;br /&gt;&lt;br /&gt;then in the conditional formatting of the fields i want to be read only i tell them if field7 is true then they are set to read only if not they are fillable.</description></item><item><title>Re: OnLoad Event</title><link>https://www.infopathdev.com:443/forums/thread/13595.aspx</link><pubDate>Tue, 13 Sep 2005 16:55:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13595</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13595.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13595</wfw:commentRss><description>Yes, on the OnLoad event you can do a check to see if a value is equal to another value.&lt;br /&gt;&lt;br /&gt;Read this tutorial that is posted on this web site -&lt;a target="_blank" href=http://www.infopathdev.com/howto/tutorials/default.aspx?i=88f921f13dec4e7cae61191bac084fff&gt;http://www.infopathdev.com/howto/tutorials/default.aspx?i=88f921f13dec4e7cae61191bac084fff&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What you are basically doing is writing your own custom functions that can return true/false and then use them in coniditional formatting.  The advantage of doing this is you can centralize you conditional fomatting logic to one place.</description></item><item><title>OnLoad Event</title><link>https://www.infopathdev.com:443/forums/thread/12565.aspx</link><pubDate>Tue, 13 Sep 2005 15:27:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12565</guid><dc:creator>drobins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12565.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12565</wfw:commentRss><description>Is it possible during the OnLoad Event to have the value of a control checked and if it is equal to true set other controls to read only?&lt;br /&gt;&lt;br /&gt;can you set a control to read only through code?</description></item></channel></rss>