comadIntake :: Login -> Appian Value
comadIntake _ = do
    executeActionByName "Initiate COMAD"
    sendUpdates1 "Select Funding Year" (dropdownUpdateF1 "Funding Year" "2017")
    sendUpdates1 "Click 'No' Button" (buttonUpdateF "No")
    mGF <- usesValue (^? getGridFieldCell . traverse)
    case mGF of
        Nothing -> fail "Could not find grid field!"
        Just gf -> sendUpdates1 "Select FRN in grid" (selectGridfieldUpdateF (IntIdent $ AppianInt 24) gf)
    sendUpdates1Handle notPrimaryOrgSelected "Click 'Add FRNs' button" (buttonUpdateWithF isAddAllButton "Could not find Add FRNs button")
    mComponents <- usesValue (^? getGridWidget . asGWC . gwVal . traverse . _2 . runFold (
                                 (,,)
                                 <$> Fold (at "Primary FRN" . traverse . _GWCheckbox)
                                 <*> Fold (at "Recovery Type" . traverse . _GWDropdown)
                                 <*> Fold (at "Adjustment Reason" . traverse . _GWDropdown)
                                 )
                             )
    case mComponents of
      Nothing -> fail "Could not find components"
      Just tpl -> rowUpdate tpl

    sendUpdates1 "Click 'Continue' Button" (buttonUpdateF "Continue")
    sendUpdates1 "Enter 'Nickname'" (textFieldArbitraryF "Nickname" 255)
    sendUpdates1 "Enter 'Narrative'" (paragraphArbitraryUpdate "Narrative" 4000)
    sendUpdates1 "Select 'Origin'" (dropdownArbitraryUpdateF "Origin")

    sendUpdates1 "Click 'Submit' Button" (buttonUpdateF "Submit")
    use appianValue
comadIntake :: Login -> Appian Value
comadIntake _ = do
    executeActionByName "Initiate COMAD"
    sendUpdates1 "Select Funding Year" (dropdownUpdateF1 "Funding Year" "2017")
    sendUpdates1 "Click 'No' Button" (buttonUpdateF "No")
    mGF <- usesValue (^? getGridFieldCell . traverse)
    case mGF of
        Nothing -> fail "Could not find grid field!"
        Just gf -> sendUpdates1 "Select FRN in grid" (selectGridfieldUpdateF (IntIdent $ AppianInt 24) gf)
    sendUpdates1Handle notPrimaryOrgSelected "Click 'Add FRNs' button" (buttonUpdateWithF isAddAllButton "Could not find Add FRNs button")
    mComponents <- usesValue (^? getGridWidget . asGWC . gwVal . traverse . _2 . runFold (
                                 (,,)
                                 <$> Fold (at "Primary FRN" . traverse . _GWCheckbox)
                                 <*> Fold (at "Recovery Type" . traverse . _GWDropdown)
                                 <*> Fold (at "Adjustment Reason" . traverse . _GWDropdown)
                                 )
                             )
    case mComponents of
      Nothing -> fail "Could not find components"
      Just tpl -> rowUpdate tpl

    sendUpdates1 "Click 'Continue' Button" (buttonUpdateF "Continue")
    sendUpdates1 "Enter 'Nickname'" (textFieldArbitraryF "Nickname" 255)
    sendUpdates1 "Enter 'Narrative'" (paragraphArbitraryUpdate "Narrative" 4000)
    sendUpdates1 "Select 'Origin'" (dropdownArbitraryUpdateF "Origin")

    sendUpdates1 "Click 'Submit' Button" (buttonUpdateF "Submit")
    use appianValue
comadIntake _ = do
    executeActionByName "Initiate COMAD"
    sendUpdates1 "Select Funding Year" (dropdownUpdateF1 "Funding Year" "2017")
    sendUpdates1 "Click 'No' Button" (buttonUpdateF "No")
    mGF <- usesValue (^? getGridFieldCell . traverse)
    case mGF of
        Nothing -> fail "Could not find grid field!"
        Just gf -> sendUpdates1 "Select FRN in grid" (selectGridfieldUpdateF (IntIdent $ AppianInt 24) gf)
    sendUpdates1Handle notPrimaryOrgSelected "Click 'Add FRNs' button" (buttonUpdateWithF isAddAllButton "Could not find Add FRNs button")
    mComponents <- usesValue (^? getGridWidget . asGWC . gwVal . traverse . _2 . runFold (
                                 (,,)
                                 <$> Fold (at "Primary FRN" . traverse . _GWCheckbox)
                                 <*> Fold (at "Recovery Type" . traverse . _GWDropdown)
                                 <*> Fold (at "Adjustment Reason" . traverse . _GWDropdown)
                                 )
                             )
    case mComponents of
      Nothing -> fail "Could not find components"
      Just tpl -> rowUpdate tpl

    sendUpdates1 "Click 'Continue' Button" (buttonUpdateF "Continue")
    sendUpdates1 "Enter 'Nickname'" (textFieldArbitraryF "Nickname" 255)
    sendUpdates1 "Enter 'Narrative'" (paragraphArbitraryUpdate "Narrative" 4000)
    sendUpdates1 "Select 'Origin'" (dropdownArbitraryUpdateF "Origin")

    sendUpdates1 "Click 'Submit' Button" (buttonUpdateF "Submit")
    use appianValue