Workflow Soluiton

 View Only
  • 1.  Decision Driven Logic in a Form Builder Component

    Posted Mar 27, 2012 01:24 PM

    Team,

    I have I Web Form Project in Workflow 7.1 sp2 that I am working on that is giving me some issues. I have been developing form driven applciations for about a year and I have had to learn most of what I know about workflow from trial and error and so forth. So I aplogize if this is a basic or no brainer question. The form that I am working on has a couple a requirements that have got me stumped, and any advice or direction that could be provided would be most helpful.

    The logic on the form is driven by a selection made form an Ensemble Menu Select Component. I have a number of classifications that have been entered via a custom category in the Hierarchy Data Service section of Service Desk 7.1 sp2. I have setup my Ensemble Menu Select Component so that it pulls from the list that was created in Service Desk, and that seems to be working just fine. The output for the Ensemble Menu Select Component is a string array. 

    I also have three panel components in this form, each have a text box, and a label component inside them. Right now each of these panel components is set to be visable only when certain selection from the Ensemble Menu Select Component have been made.This was done using a dymanitc model.

    All of the feilds need to be required, however if I have a feild that is not visable marked as required the user filling out the form will never be able to submit the form.

    The issues I am running into are as follows.

    • I dont know how to make feilds required, or ignored, based upon other selections that have been made. 
    • The Ensemble Menu Select Component does not have a "Post Form On Value Change" option. So I cannot make descions based upon selections, from the entered Service Desk Hierarchy Data Service items. As the selection from the Ensemble Menu Select Component are not copied to the output variable until AFTER the submit button on the form has been placed, and I need the check to happen before then.

    I need to find a way to get data from the Ensemble Menu Select Component, and be able to make checks aginst selections that were made in the Menu,  so that I the Panel Components will become visable when the appropriate selection has been made.

    Thank you for any and all help

     

     



  • 2.  RE: Decision Driven Logic in a Form Builder Component

    Posted Mar 27, 2012 02:40 PM

    As far as making fields required/ignored based on other selections, you can check the Use Custom Validation checkbox (under Validation on the Functionality tab) and specify a Custom Validation model for the OK button. In this model you have access to the normal FormData values. You could, as an example, use a Text Exists component to check for value in a form control. If it exists, output a null value. Otherwise, output a fatal warning message.


    Another option is to add custom Javascript if you're handy with it. You can click Add for Custom Events (under Behavior on the Fucntionality tab), specify onclick, and you're off. The method described above is probably the prefered method though.



  • 3.  RE: Decision Driven Logic in a Form Builder Component

    Posted Mar 27, 2012 03:38 PM

    Thanks i'll give this a try and let you know how it goes.



  • 4.  RE: Decision Driven Logic in a Form Builder Component

    Posted Mar 27, 2012 04:00 PM

    Another thing you can try is to to have 3 separate buttons, have the required fields correspond to each button, give all 3 buttons the same name but different output names, and then "stack" them on top of each other so they look like one. Put visibility logic on them so that if the menu selection equals a category, show the correct button and hide the other 2.

    It's a little bit more work but you can just use the error message on the controls rather than have to create error messages for each check but this is just another option.



  • 5.  RE: Decision Driven Logic in a Form Builder Component

    Posted Mar 27, 2012 04:43 PM

    Aryanos

    This was a good suggestion, I gave it a try and i discovered that would still need to make a check against the Ensemble Menu Select Component, and I'm not completed sure how to do that if I the component dosen't post.

    The output array for the menu is considered empty until AFTER the buttons would be pressed, so none of the buttons would ever be visible because the logic check would see the output array from the menu as empty and would never be able to mark them as visible. I set it up as you suggested anyway and got an error because I was trying to perform a check on an empty array. 

    Perhaps I'm wrong but this is what I have come to understand from all of my testing, and from the errors that I am seeing. It very well could be that there is a key piece that I just haven't learned yet.

     

    Thanks for the suggestion though 



  • 6.  RE: Decision Driven Logic in a Form Builder Component

    Posted Mar 27, 2012 04:45 PM

    reecardo,

    It looks like this will work for addressing my issue with the required fields, any thoughts on how to make a check aginst an empty array inside of a form builder component? Or get data into the array so the check will work?

     

    Thanks in advance 



  • 7.  RE: Decision Driven Logic in a Form Builder Component

    Posted Mar 27, 2012 05:08 PM

    Just tried doing a demo for you and realize that the EnsembleMenuSelectComponent doesn't have the built in Javascript menus that the other controls have (HideControlIfValue etc.) that you could have used to hide the buttons without a postback. I think reecardo's advice is the way to do it because of this.