Hide button in the form for requestors - InfoPath Dev
in

InfoPath Dev

Hide button in the form for requestors

Last post 08-24-2013 06:57 PM by Patrick Halstead. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-09-2013 07:38 AM

    Hide button in the form for requestors

    Hi, I created an infopath form (in Infopath 2010) which has 2 buttons: 1) Send for approval 2) Approve I would like to make something to hide button Approve for requestors (in form) and make it visible only for approvers (in form in e-mail). How I imagine the workflow? User filling in the form and click Sent for approval button (there is linked approver email) – the approve button is not visible to requestor. The form is sent to approver (outlook) who received the e-mail and has only the Approve button (there is linked other email). At the end the form is sending to other person to whom email is linked in Approve button. My questions are: how to do this to hide the button Approve in the template form for requestor and make it visible in the form in email for approver? how to do this to hide the button Sent for approval in the form in email? I think that I should use the Rules and custom code option in the button but I am not sure and have no idea very small knowledge in programming. Please, help me to find a solution. (please, please, please) :) Thanks.
  • 08-10-2013 12:08 PM In reply to

    Re: Hide button in the form for requestors

    Hi Tesoro,

    It's easy. Just add formatting rules to hide your buttons when certain conditions are met based on the workflow status and current user role.

    If you are using browser form (not InfoPath client) you can substitute user profile name (GetUserProfileName in SharePoint) for the user role.

    If you have a workflow section with multiple buttons and you want to hide the entire section, just add the formatting rules to the section.

    Easy peazy!

    Patrick Halstead
    Project Manager at Qdabra
  • 08-13-2013 03:05 AM In reply to

    Re: Hide button in the form for requestors

    Hi Patrick, Thank you for your answer. But for me it is not so easy :( I have Infopath Filler 2010. I know how to do formatting rules but I don't know: How to do a workflow status? How to set the user role? Where and how to do this? How to connect this with the button? Do I have to specify all users in e.g. sharepoint? I will be grateful if you could tell me what should I do step by step or for any hints, tips. Thank you in advance for response.
  • 08-20-2013 03:19 AM In reply to

    Re: Hide button in the form for requestors

    Could anyone tell me how o do this step by step?
  • 08-21-2013 03:05 PM In reply to

    • Doreen
    • Top 50 Contributor
      Female
    • Joined on 08-11-2010
    • Federal Way, WA
    • Posts 291

    Re: Hide button in the form for requestors

    I am using IP 2007 so steps may be different but to set up user roles go to Tools > User roles. 
    Add User role by entering individual user names (from Active directory, Ex: dns\username), by group, or a name from the form.

     In your control properties under conditional formatting (in 2007 its on Display tab), add a condition if "User's current role" equals (or is not equal to) <role you created>, do something (hide, disable format font, line etc etc)

  • 08-24-2013 06:57 PM In reply to

    Re: Hide button in the form for requestors

    Doreen - thanks! I owe you one.

    Tesoro - forget about user roles or whatever. Just add fields to your form. One field for userRole. Another for workflowStatus. Set these fields in rules and then add formatting rules to hide-show based on them.

    keeping it simple & silly (KISS)

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.