2 Replies Latest reply on Sep 25, 2009 5:29 PM by comment_1

    Creating a case field in FM 10 that grabs only certain text

    Khicks

      Title

      Creating a case field in FM 10 that grabs only certain text

      Post

      I am starting to get into the more complicated aspects of FM 10, at least for me.  I would like to take a field that contains the following data:

       

      X-Small (Out of Stock), Small, Medium (Out of Stock), Large, X-Large

       AND then in a new field that calculates a result of the words before the information between the comma and paranthesis be the result. Example of the result

       

       X-Small, Medium

       

       

      Thanks.

       

        • 1. Re: Creating a case field in FM 10 that grabs only certain text
          philmodjunk
            

          Try this calculation:

           

          Let ( sizelist = Substitute (yourfield; "," ; "¶") ;

                 filteredlist = FilterValues ( "X-Small (Out of Stock)¶ Small (Out of Stock)¶ Medium (Out of Stock)¶ Large (Out of Stock)¶ X-Large (Out of Stock)" ; sizelist ) ;

                 Substitute (filteredlist ; "¶" ; ",") )

           

          This expression changes the commas into carriage returns to change it into a list so that filtervalues can filter out only the desired terms. Then it converts the carriage returns back into commas.

          • 2. Re: Creating a case field in FM 10 that grabs only certain text
            comment_1
              

            Khicks wrote:

            a field that contains the following data:

             

            X-Small (Out of Stock), Small, Medium (Out of Stock), Large, X-Large


            I suggest you rethink your strategy: instead of pushing all this information into a single field, split it up into individual records in a related table - and use separate fields for size and availability.