User Approves/Rejects line items in one view and Approver should Approve/Reject only approved items from the previous view - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

User Approves/Rejects line items in one view and Approver should Approve/Reject only approved items from the previous view

Last post 07-31-2009 06:11 PM by naresh. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-31-2009 10:41 AM

    • naresh
    • Not Ranked
    • Joined on 07-22-2009
    • Posts 5

    User Approves/Rejects line items in one view and Approver should Approve/Reject only approved items from the previous view

    Hi,
       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.
                           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) should be able to Approve/Reject the line items only for the Approved items from the previous view(User_View).
    Can we do that by simply putting rules and conditional formatting or we need to code it in VSTA???
    Please let me know,,,Thank You....

  • 07-31-2009 06:11 PM In reply to

    • naresh
    • Not Ranked
    • Joined on 07-22-2009
    • Posts 5

    Re: User Approves/Rejects line items in one view and Approver should Approve/Reject only approved items from the previous view

    Hi All,

         I got my problem solved by the ue of 2 fields: say the variable field names as CHK_VW - (a flag field) and ADD_FLG - (name of the radio buttons).Suppose if approve is clicked then store the value as 1 into 2 fields CHK_VW and ADD_FLG 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:

    public void ADD_FLG_Changed(object sender, XmlEventArgs e)

    {

    XPathNavigator xpath = MainDataSource.CreateNavigator();

    string x=e.Site.Value;

    if (CurrentView.ViewInfo.Name.ToString() == "User_View")

    { e.Site.SelectSingleNode("../CHK_VW", NamespaceManager).SetValue(x);

    string y = e.Site.SelectSingleNode("../CHK_VW", NamespaceManager).Value;

    }

    }

    Then Set a rule for Conditional Formatting (which will be present display tab for radio button properties) in the radio buttons for the Approver_View as:

    If CHK_VW isequalto "2" Then Disable the Controls(Radio Buttons).

    That's it,,,ur job is done....Thank You

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.