Maintain date history when file attached - InfoPath Dev
in

InfoPath Dev

Maintain date history when file attached

Last post 01-09-2009 04:23 AM by jeeva. 15 replies.
Page 1 of 2 (16 items) 1 2 Next >
Sort Posts: Previous Next
  • 12-30-2008 09:04 PM

    • jeeva
    • Top 150 Contributor
      Male
    • Joined on 07-18-2008
    • Bangalore
    • Posts 79

    Maintain date history when file attached

    Hi I create browser enabled Info path form,it contains attachment filed and text box. When i attach a document in my form,text box show today() value . When i attach another document in my form text box update today() value. My requirement is i need to capture previous today() and current today()[like history of today()] values in another text box to show the history of my attachment field.
    Filed under:
  • 12-30-2008 10:12 PM In reply to

    Re: Maintain date history when file attached

    Hi,

    Add a repeating field to the data source. And when ever the user attaches the a file to attachment then get the node from the sample and add that node to the repeating field with the current today value. So that you can maintain the previous details also. This all should be done in the attachment on after change event.

    Swathip
    www.ggktech.com
  • 12-30-2008 10:34 PM In reply to

    • jeeva
    • Top 150 Contributor
      Male
    • Joined on 07-18-2008
    • Bangalore
    • Posts 79

    Re: Maintain date history when file attached

    Thank you very much my friend, I am not able to follow your solution.Please give me some detailed information about how to add a repeating filed in data source and get node from sample.
  • 12-30-2008 11:04 PM In reply to

    Re: Maintain date history when file attached

     Hi,

    You can do this without code also. Add the following rules to the attachment control.

    1. Set the condition as attachment is not blank.

    2. Add 2 actions as

            a. Set the first text box value to today().

            b. Set the second text box value to concat(<first text box field>, ";", <second text box field>)

    Swathip
    www.ggktech.com
  • 12-30-2008 11:12 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Maintain date history when file attached

    Hi,

    You need to write one function in onAfterChange event for Attachment, This function every time adds the WorkFlowHistory node. Here is the sample code,

    AddWorkFlowHistoryNode()
    {
    //Get the first work flow history node
    IXMLDOMNode previousWorkFlowHistoryNode = thisXDocument.DOM.selectSingleNode("my:myFields/my:WorkFlowHistories/my:WorkFlowHistory[1]");

    //Get the work flow history node form sample data.
    //You need to write code form this function to get the empty WorkFlowHistory node from Sample Data.
    IXMLDOMNode workFlowHistoryNode = GetNodeFromSampleData("my:myFields/my:WorkFlowHistories/my:WorkFlowHistory");

    //If You want to set the ‘Assigned To and ‘Assigned Date field values to workFlowHistoryNode before inserting this node to WorkFlowHistoryNode.

    previousWorkFlowHistoryNode.insertBefore(workFlowHistoryNode, previousWorkFlowHistoryNode);
    }

  • 12-30-2008 11:16 PM In reply to

    • jeeva
    • Top 150 Contributor
      Male
    • Joined on 07-18-2008
    • Bangalore
    • Posts 79

    Re: Maintain date history when file attached

    Super :) Your solution is working now.. Thank you very much.... Advance Happy New Year Swathip
  • 12-31-2008 02:40 AM In reply to

    • jeeva
    • Top 150 Contributor
      Male
    • Joined on 07-18-2008
    • Bangalore
    • Posts 79

    Re: Maintain date history when file attached

    Hi Friends, How can i set read only to previously entered values in repeating table. No one should change the previously entered values in repeating table. User can insert new values in repeating table.
    Filed under:
  • 12-31-2008 03:01 AM In reply to

    Re: Maintain date history when file attached

    Hi,

    Add an attribute Boolean field to the repeating node.  Default value of that field value is false. Add a rule on the submit button. Add action as set the attribute value to true. Make sure that after adding this rule only you are submitting the form. Add a conditional formatting for the repeating field as if attribute field is equal to true make the control read only.

    Swathip
    www.ggktech.com
  • 12-31-2008 03:21 AM In reply to

    • jeeva
    • Top 150 Contributor
      Male
    • Joined on 07-18-2008
    • Bangalore
    • Posts 79

    Re: Maintain date history when file attached

    Hi Thanks for your correct solution. Now i am able to set read only to my repeating node.
  • 01-09-2009 03:22 AM In reply to

    • jeeva
    • Top 150 Contributor
      Male
    • Joined on 07-18-2008
    • Bangalore
    • Posts 79

    Re: Maintain date history when file attached

     Hi Swathip,

    Incase i replace file attach control into Option button(2 buttons(Yes/No)), i am not able to get the history details.

    How can i set rule for Option button.

    Example: Reviewer needs some changes from creator side.At the time reviewer click option button(Changes Need :Yes or No).

    I need to track dates while Reviewer gives Yes or No button.

    Filed under:
  • 01-09-2009 03:54 AM In reply to

    Re: Maintain date history when file attached

    Hi,

    The same rule applies here also. Go to Option button properties.

    1. Click Rules button.

    2. Click Add Action. Set the first text box field value as today().

    3. Click Add action. Set the second text box value as concat(<first text box field>, ";", <second text box field>)

    Swathip
    www.ggktech.com
  • 01-09-2009 04:02 AM In reply to

    • jeeva
    • Top 150 Contributor
      Male
    • Joined on 07-18-2008
    • Bangalore
    • Posts 79

    Re: Maintain date history when file attached

     Hi Swatip,

    I am using same rule but it does not gives the result.

  • 01-09-2009 04:08 AM In reply to

    Re: Maintain date history when file attached

    Hi,

    What is your option button data type? Can you attach your form. So that I may give correct solution.

    Swathip
    www.ggktech.com
  • 01-09-2009 04:13 AM In reply to

    • jeeva
    • Top 150 Contributor
      Male
    • Joined on 07-18-2008
    • Bangalore
    • Posts 79

    Re: Maintain date history when file attached

     I am using Data Type as Text field.

     

  • 01-09-2009 04:21 AM In reply to

    Re: Maintain date history when file attached

     Then it should work. Are there any other rules on option buttons or text boxes? Verify once.
    Swathip
    www.ggktech.com
Page 1 of 2 (16 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.