<?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: User Approves/Rejects line items in one view and Approver should Approve/Reject only approved items from the previous view</title><link>https://www.infopathdev.com:443/forums/thread/45304.aspx</link><pubDate>Sat, 01 Aug 2009 01:11:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45304</guid><dc:creator>naresh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45304.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45304</wfw:commentRss><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I got my problem solved by the ue of 2 fields: say the variable field names as CHK_VW -&amp;nbsp;(&lt;strong&gt;a flag field)&lt;/strong&gt;&amp;nbsp;and &lt;strong&gt;ADD_FLG - &lt;/strong&gt;(&lt;strong&gt;name of the radio buttons&lt;/strong&gt;).Suppose if approve is clicked then store the value as 1 into 2 fields CHK_VW and ADD_FLG&amp;nbsp;and if rejected is clicked store the value as 2 into the 2 fields by checking if the view is User_View. Here is the code:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; ADD_FLG_Changed(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XmlEventArgs&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xpath = MainDataSource.CreateNavigator();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; x=e.Site.Value;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (CurrentView.ViewInfo.Name.ToString() == &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;User_View&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{ e.Site.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;../CHK_VW&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(x);&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; y = e.Site.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;../CHK_VW&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).Value;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Then Set a rule for &lt;strong&gt;Conditional Formatting&lt;/strong&gt;&amp;nbsp;(which will be present display tab for radio button properties)&amp;nbsp;in the radio buttons for the Approver_View as:&lt;/p&gt;
&lt;p&gt;If CHK_VW isequalto &amp;quot;2&amp;quot; Then Disable the Controls(Radio Buttons).&lt;/p&gt;
&lt;p&gt;That&amp;#39;s it,,,ur job is done....Thank You&lt;/p&gt;&lt;/font&gt;</description></item><item><title>User Approves/Rejects line items in one view and Approver should Approve/Reject only approved items from the previous view</title><link>https://www.infopathdev.com:443/forums/thread/45277.aspx</link><pubDate>Fri, 31 Jul 2009 17:41:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45277</guid><dc:creator>naresh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45277.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45277</wfw:commentRss><description>&lt;p&gt;Hi,&lt;br /&gt;&amp;nbsp;&amp;nbsp; Here is my scenario : First, a User logins in to his portal and then approves/rejects line items in one view(say User_View) in a repeating table. Then he submits the whole form to the next level which is Approver level. Then the approver logs in to his site where he will see(Approver_View) the approved and rejected line items. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; My requirement here is 1)the rejected items in the previous view(User_View) should appear grayed out in the next view(Approver_View) 2)Also the approver(in the Approver_View)&amp;nbsp;should be able to Approve/Reject the line items&amp;nbsp;only for&amp;nbsp;the Approved items from the previous view(User_View).&lt;br /&gt;Can we do that by simply putting rules and conditional formatting or we need to code it in VSTA???&lt;br /&gt;Please let me know,,,Thank You....&lt;/p&gt;</description></item></channel></rss>