How to store user name based on drop down field - InfoPath Dev
in

InfoPath Dev

How to store user name based on drop down field

Last post 04-06-2015 08:09 AM by Reema Daga. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-27-2015 12:25 PM

    How to store user name based on drop down field

    When our form is first loaded we store the current user name in a field.

    I have a “VPApprover” dropdown field which is doing a look-up to a list where we have two columns, Approver Name and Department. The Name column is a person column and I currently have the “username” displayed in the view.

    What I want to do is that when a user selects a Approver, store the Approvers “username” in a different field on our form. I’ll then compare the current “username” field to the “vpusername” field and if they are the same display an “Approve/Deny” dropdown.

    I can get so far, then get lost on what to select for the field and what to filter on.. I've attached a document that hopefully gives more information that will help you help me :)

    Thanks,

    Shane Meisner 

     

    SharePoint Business Analyst
  • 04-03-2015 05:36 PM In reply to

    Re: How to store user name based on drop down field

     Hi Shane,

     Thank you for your post on infopathdev. What you will basically need to do is set a formatting rule on your approve/decline section or dropdown to hide the approve/deny section or drop down where the condition would be if the approver name(I am assuming your are getting from a secondary data source)is not equal to the currently logged in user.

     

     

    Hope this helps! 

    Thanks,

    Reema 

  • 04-06-2015 05:39 AM In reply to

    Re: How to store user name based on drop down field

    Thanks for your thoughts.. I ended up going a different way.

     

    Since I already was capturing the username through the "GetUserProfileByName" data connection for a different field, I ended up just creating a 2nd field and on Form load stored the currently signed in users "PreferredName"( The VPApprover field was using the display name for users to select from).

     

    Then for my "Approve/Deny" drop-down, I set a rule to hide it if the Current signed "PreferredName" didn't equal the VPApprover Field.

     

    SharePoint Business Analyst
  • 04-06-2015 08:09 AM In reply to

    Re: How to store user name based on drop down field

     Hello,

    I am glad to hear your problem is resolved. But I guess we were talking about the same approach. I should I have explained it better. Here is the sample form that I forgot to attach the other day.

     Thanks,

    Reema

    ApproveRejectSample.xsn

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