1 Reply Latest reply on May 1, 2014 6:52 AM by philmodjunk

    "Dynamic" Conditional Value Lists

    Scott Van Nostrand

      Title

      "Dynamic" Conditional Value Lists

      Post

           Phil helped me get my conditional value lists (CVL) working just fine but now that has created another opportunity to perplex me. 

           Is there a way to turn off a CVL if the "parent" value is not selected? I use a single table of customer names and withing that single table are multiple entries of projects related to those customers. I added a TO of this table and set up the CVL on the project name that works great when a customer is selected. However, I sometimes want just a distinct list of all project names to be selected (when no customer is selected.  

           It's a search screen so I want the user to be able to select customer, customer and project name, or just project name.

           Is it possible to dynamically change the "Values from:" value for Project Name based upon the current value in the Customer field?

      Capture.JPG

        • 1. Re: "Dynamic" Conditional Value Lists
          philmodjunk

               An ExecuteSQL controlled CVL can do this.

               Or we can set up calculation fields on both sides of the relationship.

               Say your current relationship looks like this:

               LayoutTO::_fkClientID = ProjectsTO::_fkClientID

               Change it to:

               LayoutTO::cClientKey = ProjectsTO::cClientAll

               Define cClientKey as:

               If ( IsEmpty ( _fkClientID ) ; "All" ; _fkClientID )

               Select Text as your return type.

               Define cClientAll as:

               List ( _fkClientID ; "All" )