2 Replies Latest reply on Mar 17, 2015 5:54 AM by Gilo







      I have a Let Script where I need some help

      Let (isempty (Filter(product:type = "Premium Classic") /= 1 ; 2;
      isempty (Filter(product:type = "Premium Select") /= 1 ; 2 ;

      isempty (Filter(product:type = "Premium Premium") /= 1 ; 2 ;

      /= means ISNOT
      Is it not possible to tell FM to Filter for Words starting with premium, no matter what come behind?

      And if FM finds that 2 Filters are not empty, it returns 0??? But should return 2!!!


        • 1. Re: FilterElements

          I have no idea what a Let Script is, but that's not at all how a let function works, and that's not how the Filter function works.  You may need to use Case & PatternCount.  Can you explain what you want to do a little better, because all 3 result =2, if not they equal 0.

          • 2. Re: FilterElements

            Well this is what I have and need

            client ----< household (based on clients)

            where client:adress = household:adress

            client ----< household ---< contracts

            where household:client_ID = contract:contract_client_ID

            So FM shows me on my client layout all contracts from the household, the client's from. Works perfectly. 

            But I need now a field client:check, which gives me back

            1, if there is one or more "Premium" in contract:contract_type
            2, if there is one or more "Gold" in contract:contract_type
            3, if there is one or more "Normal" in contract:contract_type

            I have a layout, based on clients, with a portal based on contract and it shows me all contracts of the client. But my field only checks the first line of the portal. If the 3 or 4 portal line has "Gold" it ignores it. Why is this? How can I solve this problem?