How can I create an approval workflow but hide certain form parts from specific approvers?

  • losdbenefits
    Asked on January 5, 2022 at 11:07 AM

    I am not using the system approval process. What I am doing is if the first supervisor approves, I'd like to send an email for "final approval" to our director. I was using the emails to do that. The problem I'm having is I have a condition that states if approved by the supervisor and geturl is edit then show final approval. What is happening is because it is an edit for the supervisor as soon as they approve it, the final approval field shows up. Is there a "2nd" geturl or another way to hide that field until the director edits it for final approval?


    Hope this makes sense.

  • Christopher JotForm Support
    Replied on January 5, 2022 at 12:24 PM

    How are you providing the links for editing the forms?

    The only workaround I could think of would be an additional URL parameter to the edit link.

    Here is an example:

    Default Edit Link: https://www.jotform.com/edit/5172120160812909754?utm_source=emailfooter&utm_medium=email&utm_term=220044655938055&utm_content=edit_submissions&utm_campaign=notification_email_footer_submission_links&email_type=notification

    Edit Link with additional parameter: https://www.jotform.com/edit/5172120160812909754?utm_source=emailfooter&utm_medium=email&utm_term=220044655938055&utm_content=edit_submissions&utm_campaign=notification_email_footer_submission_links&email_type=notification&final=true

    As you can see I added an additional URL parameter which is final=true which you can use for your SHOW/HIDE condition instead of edit.

    If you have further questions, please let us know.

  • losdbenefits
    Replied on January 7, 2022 at 1:09 PM

    How do I add final=true to the {edit-link] in the email that the supervisor receives?


    1641578920 61d881a883e7d Capture jotform Screenshot 10

  • Gilbert JotForm Support
    Replied on January 7, 2022 at 4:28 PM

    Hello,

    I believe it's not possible to add URL parameters on the edit link in the email since it loads a different PHP file that is not designed to read URL query strings and only reads the value from the database.

    However, another option I could think of is to set a condition for final approval to send the email to the director if a certain field from the first approval is filled.

    Here's the context:

    User fills the form > the supervisor receives the email for first approval > he clicks the edit link and makes some changes to the form > set a condition that will trigger if a certain field is edited by the supervisor so that the final approval will be sent to the director.

    An example condition would be: If the supervisor signature field is filled, send the final approval email to the director.

    Since we know that the supervisor signature will only be filled once the supervisor receives the first approval email and edits the form, we can use this as a condition parameter to trigger the sending of the final approval email. Again, this is just an example since I haven't fully grasped yet the full process of your form when it comes to the approval part of the supervisor and director.

    However, this way, you won't need to use the edit link as a condition anymore for the final approval.

    If you have any other questions or concerns, please let us know.

  • losdbenefits
    Replied on January 7, 2022 at 6:17 PM

    The problem I'm having is I do not want the final approval box to show for the supervisor approval. The recommendation shown below is why I wanted to figure out how to add the final=true to the edit link. Any other suggestions on how to do this?

    Christopher_T

    Jotform Support

    Answered on January 05, 2022 at 12:24 PM

    How are you providing the links for editing the forms?

    The only workaround I could think of would be an additional URL parameter to the edit link.

    Here is an example:

    Default Edit Link: https://www.jotform.com/edit/5172120160812909754?utm_source=emailfooter&utm_medium=email&utm_term=220044655938055&utm_content=edit_submissions&utm_campaign=notification_email_footer_submission_links&email_type=notification

    Edit Link with additional parameter: https://www.jotform.com/edit/5172120160812909754?utm_source=emailfooter&utm_medium=email&utm_term=220044655938055&utm_content=edit_submissions&utm_campaign=notification_email_footer_submission_links&email_type=notification&final=true

    As you can see I added an additional URL parameter which is final=true which you can use for your SHOW/HIDE condition instead of edit.

    If you have further questions, please let us know.


  • Christian JotForm Support
    Replied on January 8, 2022 at 1:14 AM

    Hi,

    As my colleague Gilbert has mentioned, we don't believe it is possible to use URL parameter to Show/Hide a field(s). This is best achieved by creating a Show/Hide conditional logic.

    I would recommend following Gilbert's suggestion to set any of the fields that the supervisor fill out as a trigger to show the Final Approval section. Or better yet, create an approval flow.

    Thanks!

  • losdbenefits
    Replied on January 8, 2022 at 12:21 PM

    My question is how do I set the fields the supervisor fills out as a trigger to show the final approval section?

    The current process is:

    Employee fills out and submits

    Supervisor gets an email with edit link and goes in and approves and submits

    Final approver gets an email that final approval is needed. From here how do I show only the final approver field for approval?


  • Kat JotForm Support
    Replied on January 8, 2022 at 2:08 PM

    Hi there,

    Happy to help!

    Thank you for clarifying your use case: in this case, I do believe that we can utilize a multi-step approval approach as you have requirements to hide certain fields from certain approvers.

    Please allow me some time to put together an example for you in this case and I will update you via this thread as soon as possible.

    Thank you in advance for your patience and understanding!

  • Kat JotForm Support
    Replied on January 8, 2022 at 2:54 PM

    Hi again,

    As I'm putting together this potential solution for you, I realized that I have a couple of clarifying questions for you in regards to some of the finer points of your use case:

    1) Will the Supervisor Email be the same email each time or will this email change based on which employee is filling the form out?

    2) Same question for the final approver email: will this change? If so, how will this email be determined?

    Once I have the answers to these questions, I can better put together a flow that will work best for your use case in particular.

    I look forward to your response!

  • losdbenefits
    Replied on January 8, 2022 at 7:34 PM

    Are you referring to the supervisor's email address?

    We have 3 site supervisors who are the first approval. Depending on which site the employee chooses will determine which of the 3 supervisors do the first approval.

    Once the first approval is done, then it will go to both the all supervisor and the director. Either one of them can be the final approval.

    I have different emails with conditions depending on who should receive it. ie if employee x chooses site Green Acres, then the email would go to the supervisor at Green acres for approval. Once they the supervisor submits the approval, it will send out another email stating it is ready for final approval and that will go to the all supervisor and the director. They will go in and then click the final approval. Currently I have them enter a code so that the final approval box shows up.

    Does this answer your questions?

  • Christian JotForm Support
    Replied on January 9, 2022 at 12:00 AM

    Hi there,

    Thank you so much for the additional information, I am sure this will be very helpful for my colleague Katherine to be able to provide a more specific resolution.

    You'll hear from us as soon as an update is available. Thank you!

  • Kat JotForm Support
    Replied on January 9, 2022 at 2:05 PM

    Hi again,

    Thank you for your clarification: they were helpful to ensure the accuracy of my example.

    I appreciate your continued patience as I work towards putting this together and then crafting my response to you here. I will respond as soon as possible.

  • Kat JotForm Support
    Replied on January 9, 2022 at 3:28 PM

    Hi again,

    Thank you again for your patience as I put this example together for you. I made a clone of your form 213456435611048 but could not see an existing Approval Flow, but regardless, we are starting from scratch. As such, you can find my cloned form here: https://form.jotform.com/220085983886975 if you'd like to test it or clone it yourself.

    Upon review of your Conditional Logic, you've actually done most of the legwork yourself, so some of my demonstration may seem repetitive. However, for best clarity, I have "started from scratch" to avoid confusion.

    As per your previous response, we have three supervisors that need to Approve the overall submission based on location. For this part, we can use the Approval Flow functionality without needing URL parameters. You've likely already figured this part out; however, here is the step by step, just in case:

    1641756432 61db3710ca6eb  Screenshot 10

    First, we're going to add three If/Else Condition branches for each supervisor. As shown above, these conditions will be predicated on which School Site is selected by the respondent.

    Next, we'll add in the three Approval pieces of the workflow to send to the separate supervisory emails. To avoid any confusion, I have named them and organized them as shown in the screenshot above.

    Now, we'll get into our emails for final approval so it only shows the final approval field. First, let's get the email flow set up. I've set this in my example to have one email sent to the All Supervisor and Director, but you can change this as needed (I'll explain more below):

    1641757619 61db3bb3d32e5  Screenshot 21

    Now, it's in this email that we'll use our URL parameters. Instead of using "edit" as our deciding parameter, though, we'll give this a unique name. For the purposes of this example, let's use the parameter approval=final so our URL will look like https://www.jotform.com/edit/{id}?approval=final

    We'll pop this into the email body content by customizing the Final Approval Email:

    1641758297 61db3e59e663d  Screenshot 32

    For this example I've simply put:

    1641758262 61db3e3616a09  Screenshot 43
    This is also where you can set the all supervisor and director recipients if you choose:

    1641758438 61db3ee67ff5e  Screenshot 54

    Now, we'll set our Conditions to ensure that we're showing and hiding the correct fields for final approval. You can hide whichever fields you'd like and show the corresponding fields as well. For example:

    1641759085 61db416dd189d showhideforfina Screenshot 65

    In my clone, I've left your existing SHOW/HIDE conditions, but have deleted the existing email conditions due to our Approval Flow emails and the emails conditions we're about to create.

    So now we can set our Email Conditions to send the Final Approval notification to our supervisors and to the employee. I've used your pre-existing Auto Responder for employees for the condition to send the Approval email to your employee upon final approval:

    1641759414 61db42b65b313  Screenshot 76

    And we can send another email to supervisors notifying them that final approval has been received if you wish. I've created a new, boilerplate Notification email to go to the supervisors as well to let them know final approval has been received which we can send through a Condition like so (we'll do a Notification email so we can dictate recipients):

    1641759743 61db43ff55343  Screenshot 87

    Upon testing with separate emails to mimic different supervisor emails, the workflow is sending to the correct recipients and Final Approval is sending as needed. You may want to delete some of the extra emails, but I have left them in the clone for you to include or exclude at your discretion.

    Would this workflow be viable for your use case? We look forward to your review and response.

  • losdbenefits
    Replied on January 9, 2022 at 4:34 PM

    Wow, I appreciate all the work you have put into this. What I would like to do is keep my existing form and maybe add in your features because we have already had some submissions and approvals, etc.


    A few questions about the workflow since I really haven't used it much. Does this replace the approval emails that I setup initially? By hitting the "approve" button it takes the approver to Jotform rather than the original form, correct? I just cloned and played with yours and I could not get it to work quite right.

    https://form.jotform.com/220086704966158


    So far I setup the If/Else Condition for each site

    If True then supervisor Approval

    Not sure how to get the next part you referenced with Deny/Approval.





  • losdbenefits
    Replied on January 9, 2022 at 4:58 PM

    Ok, I think I have some sort of approval path setup on the clone. Please check to see if this will work.

    https://www.jotform.com/workflow/220086547653156/build


    If I can avoid all the emails, I think that is better at this point. I setup two emails, one for denial and one for approval. If I am understanding this correctly, then just the supervisors will get notification through the workflow and once they approve, the director will get approval through the workflow as well?



  • Laura JotForm Support
    Replied on January 9, 2022 at 9:17 PM

    Hi,

    Everything looks correct in the Approval Flow that you have set up.
    And yes that is correct, only the supervisor for the selected school site will receive the approval email.

    If they deny the request, the denied email will be sent to the email address entered on the form.
    If they approve the request, the request is sent to the director to be signed. After the director has signed it, an email to the person who filled out the form is sent.

    Currently I can still see that you have also the original Autoresponder and Notification emails on the form:
    1641780970 61db96ea72ddd duplicateemails Screenshot 10
    You can remove the emails you do not need to avoid duplicate emails being sent from the Approval Flows.

    If you have any further questions, please let us know and we are happy to help.

  • losdbenefits
    Replied on January 20, 2022 at 6:38 PM

    I'm still thinking on how to do this. What I'm thinking now, is this:


    Employee submits timesheet

    Email goes to site supervisor for first approval/form edit

    Approval process...once the site supervisor "edits' the timesheet with their approval, I'd like to use the approval process for the director and final approval. Is it possible for the approval process to start after the edit is submitted rather than when the form is first submitted?



  • Christian JotForm Support
    Replied on January 21, 2022 at 1:35 AM

    Hi there,

    Is it possible for the approval process to start after the edit is submitted rather than when the form is first submitted?

    Yes, it possible to start the approval process after the supervisor approves via editing the form. Since you already have a conditional logic that sends an email to the corresponding supervisor based on the endusers input on the School Site field, and a Get Form Page URL widget, here's what you need to do next;

    1.) Create a Show/Hide Field conditional logic that shows the designated fields for the supervisor to fill out if the Get Form Page URL contains the word EDIT.

    1642746214 61ea51663082e Screen%20Shot%2 Screenshot 101642746212 61ea5164a8e01 Screen%20Shot%2 Screenshot 21

    2.) Now, this is how your approval flow should look like, it starts with a conditional branch. Using the the Approval field that the supervisor filled;

    • If the sup's input to Approval field on the form is equal to Approved, then it sends an approval request to the director,
    • If it's equal to Denied, then it sends a Denied email to the employee

    After the director completes the approval task;

    • If director approves, it sends an Approved email to the employee.
    • If the director denies, the flow sends a Denied email to the employee.

    Demo approval flow link - https://www.jotform.com/workflow/220201028775952/build

    Demo form link - https://www.jotform.com/build/220201139463949

    1642746344 61ea51e850fa5 Screen%20Shot%2 Screenshot 32

    Hope this helps, please let is know if you require further assistance. Thank you!

    Regards,



  • losdbenefits
    Replied on January 21, 2022 at 11:19 AM

    One more question: We currently have this linked to a spreadhseet so that we can track the information for payroll. Is there a way to add a field to the spreadsheet to show the final approval from the workflow has been done?

  • Dragana JotForm Support
    Replied on January 21, 2022 at 12:49 PM

    Hi, Heidi!

    The Approval Workflow cannot automatically change the submission in Google Sheets. However, the Google Sheets are updated every time you update the submission on Jotform.

    Allow editing of the form and add a step to the approval flow to edit the submission and add the approval status (approved/denied) to the form. You can have an Approved/Denied cell in the Sheet that updates whenever the edit has been made to the form.

    You may do this by placing the edit link in the email element in the Approval Workflow.

    So, head to the Approval Workflow page, click on the email element and add the edit link to the email template below.

    1642787118 61eaf12ed5188  Screenshot 10

    Please give it a try and let us know how it goes.

    We're happy to help.