Updating userName() per user after the form has been submitted in Filler 2010 - InfoPath Dev
in

InfoPath Dev

Updating userName() per user after the form has been submitted in Filler 2010

Last post 06-13-2013 05:35 AM by ErnestoM. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 06-01-2011 06:29 AM

    • bress
    • Not Ranked
      Male
    • Joined on 11-01-2010
    • NC
    • Posts 4

    Updating userName() per user after the form has been submitted in Filler 2010

    I have a single form that I built to capture new inventory item details from several diffident users in different departments. It travels a workflow I built in SP Foundations. ----That part seems ok. I'm trying to get the form to update the User Name after it has been submitted. After the form has been initiated and submitted by the first user, his name becomes part of the form and does NOT update the User Name with the next person who opens it, so my form rules stop working because I'm trying to validate the user against the User Name to limit what fields can be filled by the current user in the wofkflow. The Default value of the field is userName() and the box is checked to "Refresh value when formula is recalculated" How do I force the userName() to update each time the form is opened so my rules can validate against the current user and have the appropriate fields for that user become active? (is there any alternatives?) I hope this makes scene! Thanks in advance Brian
  • 06-01-2011 09:39 AM In reply to

    Re: Updating userName() per user after the form has been submitted in Filler 2010

    Create one field and call it Creator. Add an onload rule that executes only when the Creator field is blank (i.e. it will only execute on first open). Set the field to username().

    Create another field and call it CurrentUser. Add an onload rule that executes every time, and sets the value of CurrentUser to username().

    Hope this helps.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-02-2011 05:23 AM In reply to

    • bress
    • Not Ranked
      Male
    • Joined on 11-01-2010
    • NC
    • Posts 4

    Re: Updating userName() per user after the form has been submitted in Filler 2010

    Thanks for the help! It was exactly what I needed!
  • 04-09-2013 02:29 PM In reply to

    Re: Updating userName() per user after the form has been submitted in Filler 2010

    I have a quick question (newbie on IP 2010) What do you mean by "add an onload rule" can you give me a more detailed set of steps? thanks
  • 04-09-2013 07:40 PM In reply to

    Re: Updating userName() per user after the form has been submitted in Filler 2010

     Under the Data tab in the Ribbon in IP 2010, one option for rules is Form Load. Those are rules that run when the template opens.

    Hilary Stoupa

  • 06-12-2013 01:26 PM In reply to

    Re: Updating userName() per user after the form has been submitted in Filler 2010

    Hi Ernesto,

    You slution might help me but I couldn't seem to implement it successfully. Here's my scenario- I have got a web Infopath form with 3 different views. Requestor view, Approver view, Clearer view.

    When the form loads, it launches Requestor view and i made user type in his username. After he submits the form, there's a custom workflow that goes to the concerned approver. When an approver opens the form, there's a field by Name ApproverUserID. On its value property, i used username().However when an approver opens the form,  it holds the userid of the person who filled in the request, whereas it should be the approver's username. Though I set to automatically refresh on calculation che ckbox, it holds the username of filler. 

    I want ApproverUesrID field to hold the name of the person who opens it. Not the username who filled out the form. Because I have to properly audit who approved the request form. Any idea on how do I achive it. Its going to be useful to me because once the form is approved, workflow routes it to Clearer. Clearer on opening the form should see Clearer's username in the new field in clearer view by name Clearer UESRID.

    Any idea? Thanks.  

  • 06-13-2013 05:35 AM In reply to

    Re: Updating userName() per user after the form has been submitted in Filler 2010

    nemo385:

    Though I set to automatically refresh on calculation che ckbox, it holds the username of filler. 

    This is a bit confusing. It sounds like you have a default value on the field... going back to my original advice:

    ErnestoM:

    Create one field and call it Creator. Add an onload rule that executes only when the Creator field is blank (i.e. it will only execute on first open). Set the field to username().

    Create another field and call it CurrentUser. Add an onload rule that executes every time, and sets the value of CurrentUser to username().

     

    The Creator field will store your Requestor. This gets populated via an On Load rule.

    The CurrentUser field gets populated, also, on load, and not via a default value.

    I would add a third field called Approver and, when the Approver clicks the "Approve" button, a rule can set the value of that field to username().

    Hope this helps!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


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