3 Replies Latest reply on Jun 1, 2012 1:30 PM by Jason Capriotti

    Conditional logic in File Cards

    Chris Bassett

      CAn you use conditional logic (similar to IF..THEN...ELSE in programming languages) with file cards?


      What I want to do is have a text label that is dependent on the value of a variable.  So, for example, if variable ECR_Status has a value of "0", it would indicate UNDECIDED, and have the text field on the file data card say UNDECIDED.  If the ECR_Status value is 1, then I want the text field on the file data card to say ACCEPTED, and so on.


      Can this be done with Enterprise PDM 2012?  (If not, then if someone could point me in the direction of how I could get something like this to work.  It is being used in our production department, and some of the people don't quite understand the idea behind variables and data car values, and I'm trying to make it as easy to understand for everyone by using text labels that make sense, rather than having ECR_Status be equal to some number ,and have to have people figure out what the number means...)

        • Re: Conditional logic in File Cards
          Jason Capriotti

          You can't drive the text of the label as far as I know, however you place multiple labels with the different text and then hide them based on a variable on the card using "Control Logic" from the Control menu.


          • You pick "Hide"
          • Then select a variable "ECR_Status"
          • Select "not equal" a number.


          Another idea is to create a "List" of your status' and select the data type "Text with Alias". Behind the scenes it's a number but displays what ever text you specify as the alias for that number in the data card. You have to use a dropdown box/list on the card and then pick the list.

          • Re: Conditional logic in File Cards
            Brian Dalton

            You may be able to achieve your desired goal using an 'Input Formula' for the control, though I haven't used that feature myself.  Check out the help file for more details.

              • Re: Conditional logic in File Cards
                Jason Capriotti

                Yeah, that would work as well.


                Syntax we've used on a text field linked to Plant Code:

                %Plant Name(HornLake = 1, Middleton = 2, Cincinnati = 3, Canada = 4, Walnut = 5)%



                You have two variable fields, in our case it was "Plant Name" and "Plant Code".  The user selected a dropdown with the plant name the input formula entered teh number int eh other text field.


                We swtich to the alias list when it was introduced in 2011 so it was just one field.