Conditions not working

  • PenderCountyHR
    Asked on August 19, 2020 at 5:07 PM

    I have a complex form with workflows and I can't seem to get my conditions quite right. There are two issues:

    1 - Show/hide certain items/fields based on who is editing the form.

    2 - Disable certain/fields based on who is editing the form.

    I want to be able to show items 2, 12, 13, 14, but hide 3, 15, 16, 17 when the person who receives the email notification on submission titled "Send to Department Head for Approval" and they click on the link. I also want items 5 through 11 to be disabled.

    Then once the form is submitted again... the next person will get an email notification titled "Approved by Department Head - Send to County Manager." And when this person gets the email and clicks on the link.... I want to be able to show items 3, 15, 16, 17, but hide item 2. I also want to disable items 5 through 14.

    I am having a very difficult time making this work.

    Thanks in advance for any help!


  • jherwin
    Replied on August 19, 2020 at 10:04 PM

    Thanks for contacting us!

    Can you please provide us with submission edit links that will direct us to the issue/workflow you are referring to so that we can review and test it on our end? That way, we can see the workflow you are working on and fix the conditional logic if necessary.

    Also, please mention the field labels associated with each requirement rather than the number of items.

    Looking forward to your response.

  • PenderCountyHR
    Replied on August 20, 2020 at 9:50 AM

    The submission edit links are in the body of the email notifications I referenced in the original post, but I will include those here:

    https://www.jotform.com/edit/{id}?id_15

    https://www.jotform.com/edit/{id}?id_29

    I have also tried just https://www.jotform.com/edit/{id} as well.

     

    Below I am including a screenshot of the field labels as they coincide with the item numbers I referenced in the previous post.

     1597931507Fields Screenshot 10

    Let me know if you need anything else.

    Thanks again!

     

  • Ed Enterprise Customer Success Engineer
    Replied on August 20, 2020 at 12:13 PM

    Hi @PenderCounty, 

    Thank you, I'll look at this now as it's quite complex it may take me a few hours or until tomorrow morning to go over everything and see what is & is not possible. 

    Thank you for your patience!

  • PenderCountyHR
    Replied on August 20, 2020 at 12:19 PM

    Thanks!

  • PenderCountyHR
    Replied on August 24, 2020 at 12:45 PM

    Hello - following up to see if you have any update.

    Thanks!

  • Ed Enterprise Customer Success Engineer
    Replied on August 24, 2020 at 1:51 PM

    Hi @PenderCounty, 

    I don't for now I'm afraid, it was more complicated than I originally estimated. But I have been working on it today, and will update you by the end of today. 

    I apologize about the delay!

  • PenderCountyHR
    Replied on August 31, 2020 at 8:37 AM

    Hello - following up to see if you have had any luck. I understand this is a complex scenario, but hoping there is a way.

    Thanks for all your help!

  • Jovanne JotForm Support
    Replied on August 31, 2020 at 10:46 AM

    Hi, let me check on the previously assigned support member if he has any updates.

    Further, I have checked the form and I had a hard time understanding the process workflow in the conditions. Can you give us more details of the process workflow?

    Here's a sample use case:

    - Customer submits a form

    - Manager A receives it via email and reviews the entry

    - Manager A confirms and approves it by editing the submission and re-submitting it

    - Manager B (or someone else) receives another email after Manager A's approval

    - The customer receives an email whether he's approved or denied

    Also, please mention the field labels to which field will be shown/hidden or disabled with each requirement.

    Related Guide: A-General-Approach-on-Building-an-Approval-Process-Workflow

    We look forward to your response.

  • PenderCountyHR
    Replied on August 31, 2020 at 2:31 PM

    Thanks! Here is the appropriate workflow:

     1. Employee fills out the form and answers the following questions:

    - Do you have outside or secondary employment situations according to the policy as defined?

    - Employee Name

    - Employee Email

    - Department Head Name

    - Department Head Email

    - Secondary/Outside Employment (**Note - this table does not appear unless the employee answers yes to the first question).

    - Employee Signature

    All other fields are hidden to the employee.

    If the Employee answers "no" to the first question... on submit, they will receive an autoresponse ("AUTO RESPOND - NO SECONDARY/OUTSIDE EMPLOYMENT") and the Human Resources office will receive a notification email ("NO SECONDARY/OUTSIDE EMPLOYMENT"). Both emails are based on a condition.

    If the Employee answers "yes" to the first question... on submit, they will receive an autoresponse ("AUTO RESPOND - REQUEST FORWARDED") and the Department Head will receive a notification email ("SEND TO DEPARTMENT HEAD FOR APPROVAL"). Both emails are based on a condition.

    2. Department Head will get an email if the employee answers "yes" to the first question that will have a link to the form in order to edit. Upon opening, the Department Head should be greeted with the following message at the top of the form:

    {departmentHead},

    Please review this request by {employeeName} for secondary or outside employment and approve or decline their request.

    Thanks!

    Human Resources

    ** Note - the message in red is different for the County Manager and the Department Head. So the County Manager message in red should not be seen by the Department Head.

    The Department Head will also be able to see all of the fields the employee could see, but SHOULD NOT be able to edit any of them. They should be disabled. Additional fields that the Department Head should be able to see and fill out include:

    - Approved or Declined by Department Head

    - Please indicate reason - Department Head

    - Department Head Signature

    All other fields after this should be hidden to the Department Head.

    If the Department Head answers "declined" to the question "Approved or Declined by Department Head", then a notification email ("DECLINED BY DEPARTMENT HEAD") will be sent to the Employee and to the Department Head. Both emails are based on a condition.

    If the Department Head answers "approved" to the question "Approved or Declined by Department Head", then a notification email ("APPROVED BY DEPARTMENT HEAD - SEND TO COUNTY MANAGER") will be sent to the County Manager. This email is based on a condition.

    3. County manager will get an email if the Department Head answers "approved" to the question "Approved or Declined by Department Head" and will have a link to the form in order to edit. Upon opening, the County Manager should be greeted with the following message at the top of the form:

    County Manager,

    Please review this request by {employeeName} for secondary or outside employment. {departmentHead} does not object to this request and is asking for you to approve or decline their request below.

    Thanks!

    Human Resources

    ** Note - the message in red is different for the County Manager and the Department Head. So the Department Head message in red should not be seen by the County Manager.

    The County Manager will be able to see all of the fields the Department Head could see, but SHOULD NOT be able to edit any of them. They should be disabled. Additional fields that the County Manager should be able to see and fill out include:

    - Approved or Declined by County Manager

    - Please indicate reason - County Manager

    - County Manager Signature

    This is where I have stopped. Everything works up to this point except I cannot make certain fields mentioned above to appear/hide according to conditions OR to disable fields mentioned above according to conditions.

    Hoping this helps.

    Thanks!

     

     
     
  • Ed Enterprise Customer Success Engineer
    Replied on August 31, 2020 at 3:32 PM

    Thank you @PenderCountry, we're both looking over this now and will update you likely later today.

    Thank you for your patience!

  • Ed Enterprise Customer Success Engineer
    Replied on September 1, 2020 at 10:23 AM

    Hi @PenderCountry,

    Thank you for your patience, I've believe I've worked out all the steps here. I'll write it up and post a link to my cloned form when it is cleaned up within the next few hours. 

    Thank you!

  • PenderCountyHR
    Replied on September 4, 2020 at 9:33 AM

    Following up. 

    Thanks!

  • Sonnyfer JotForm Support
    Replied on September 4, 2020 at 9:45 AM

    Hi - Thanks for following up. I see my colleague is working on a solution for you. I also notified him to get back to you soon.

  • PenderCountyHR
    Replied on September 9, 2020 at 2:06 PM

    Following up again. Thanks!

  • Ed Enterprise Customer Success Engineer
    Replied on September 9, 2020 at 2:13 PM

    Hi @PenderCounty,

    I do apologize about the delay, I'm writing it up at the moment - you should see it within a few hours.

    Thank you!

  • PenderCountyHR
    Replied on September 14, 2020 at 8:50 AM

    Following up again. It's been a month since I submitted this and two weeks since I was informed there was a solution and I would be sent the specifics. Any chance I could get something in the next day or so?

    Thanks!

  • Ed Enterprise Customer Success Engineer
    Replied on September 14, 2020 at 3:08 PM

    Hi @PenderCounty,

    I am sorry this took considerably longer than I initially thought. However, the issue comes in when you want to create the third step in one form - generally two is the maximum as the reliable way to generate the 2nd set of conditions can be done when the logic is 'page url contains edit'. But since this would apply to both 2 & 3 the conditions would be triggered on both.

    I think a solution would be to use a 2nd form, where you pass all the details of the 1st to it and when the approval or decline comes there the email that is sent out has a link to the 2nd form (where the fields are filled out by the parameters from the first). A guide on parameters in the URL is here, but I'll clone yours shortly and set it up how I mean so you can see if it's what you want. I'll complete it by 7pm ET and post it up here.

    Thank you for your patience!

  • Ed Enterprise Customer Success Engineer
    Replied on September 14, 2020 at 8:12 PM

    Hi @PenderCounty,

    Ok, so the first form like yours is here. That has all the same fields and logic except, I've removed the County Manger alert text and also their input boxes since they would not see that form. The 2nd form is also much the same except I've removed the department head notification and all logic since it's not needed as all fields would be shown (although you can add logic to disable all of them).

    The employee then submits it, and the department head gets the form as before with the fields inputted. However, in the County Manager email it links to a separate form here. The link is configured to take the fields from form 1 and pass them to form 2, the full link within the County Manager notification email looks like this:

    "https://www.jotform.com/form/202577707650964/?doYou11={doYou11}&employeeName[first]={employeeName:first}&employeeName[last]={employeeName:last}&employeeEmail={employeeEmail}=&departmentHead[first]={departmentHead:first}&departmentHead[last]={departmentHead:last}&approvedOr={approvedOr}&pleaseIndicate={pleaseIndicate}&secondaryoutsideEmployment24[0][0]={typeA37}"

    The blue text is the 2nd form urlThe red text is the form field name on the 2nd formThe green text is the form field name from the first. A full guide on passing fields between forms is here.

    And the employee's other employment options isn't included in full in that url above but you can extend it easily. Because the input table is an array if you try and pass it in full it displays the whole table and corrupts the link, as such you first need to pass each individual field to a individual field calculation widget, eg here I've clicked 'Add field' and then seleted the other employment from the list which allows the table to appear like below. I've then selected the first one:

    1600128468 5f6005d438c15 Screenshot 2020 Screenshot 10

    And then you'd add other rows and columns to the url by changing the [0][0] to be the row & column it needs to be in and changing the {typeA37} to be the new field calculation widget you've also created. But once you do, it will add them all in - I have tried several other options and none of them work. Currently the flow on mine only sends the field from index [0][0] (top left).

    Let me know if you have any questions.

  • PenderCountyHR
    Replied on September 15, 2020 at 9:18 AM

    A lot to digest here. Let me take some time to look at all this and get back to you if I have any questions. Thanks so much for helping with this!