3 Replies Latest reply: Dec 29, 2017 5:56 AM by Grant Perkins RSS

    Function "Code_XL" does not exist

    Andy Coles

      I'm trying to make a bunch of filters that look at the first letter of a surname.   In 10.5 the following worked:


      Code_XL([Last Name])>64


      Code_XL([Last Name])<68


      If I try the same in 14.3 I get the validation message Function "Code_XL" does not exist even though I've picked the function from the menu on the filter screen.  Am I doing something wrong?


      If I create a formula field to return the value using the same function that seems to work OK.  I guess I could make a filter based on that formula field but I'd like to know where I'm going wrong with the original filter as I'm going to need to replicate it in a large number of other models.



        • Re: Function "Code_XL" does not exist
          Mo Abdolrahim

          The code_XL() function should exist in the Monarch classic v14.3.

          All Code_XL function does it returns the ASCII code of the first character of the string passed to the code_xl function.

          You can replace code_xl function with ASC function.  For example if the field [Last Name] contains the word 'Smith', both code_xl and asc function returns numeric value of 83.



            • Re: Function "Code_XL" does not exist
              Andy Coles

              Thank you - I'll give that a try instead.

                • Re: Function "Code_XL" does not exist
                  Grant Perkins



                  The function you want, and a number of others, are included not as core functions (AFAIK) but in the User Defined Functions model.


                  If your model does not have this Auto set as an External Model (or the file is inaccessible for some reason) you are likely to see the message about not available.


                  By default this model is located somewhere like




                  Which puts in in with the training files.


                  Normally it is a default External Model in the Table as a lookup for External models but of course can be eliminated or may be missing of you are upgrading a model created before such functionality existed. (That goes back some way though ....)


                  You can Manage the External Model(s) through the Table Design screens.


                  Hit the Functions button (fx) and then see what you get. Probably the option to "Manage External Lookups" will come in useful.


                  I'm guessing that your problem may be illuminated by checking these options  - but I suppose the missing function could be due to some other reason entirely.