0

Has anyone successfully used "Global script definitions"?

I created a simple UDF to test it out and I get this...

 

Screen Shot 2018-12-19 at 9.16.57 AM

 

Also, it doesn't appear as if this works for variables defined in "Global script definitions". Meaning, if you try to use a variable defined there in a formula field, you'll get a "Field not found" message.

7 replies

null
    • blackie
    • 6 yrs agoWed, December 19, 2018 at 3:31 PM UTC
    • Reported - view

    I haven't tried much, but haven't had any luck yet.

    • Sean
    • 6 yrs agoWed, December 19, 2018 at 3:38 PM UTC
    • Reported - view

    Thanks for confirming. If it can’t process simple functions, no point in spending a lot of time on complicated ones.

    • Sviluppatore Ninox
    • Fabio
    • 6 yrs agoWed, December 19, 2018 at 5:14 PM UTC
    • Reported - view

    Hello. I tried a general function and it works fine. I did this:

    - I went to central place;
    - on the options tab, there's a new setting for globally defined functions and I defined this:

    ----------------------------------------------
    function textLength(text : text) do
    count(split(text, ""))
    end
    ----------------------------------------------

    Then, I create a new formula inside any table and it worked!

    Fabio

    • Sean
    • 6 yrs agoWed, December 19, 2018 at 5:27 PM UTC
    • Reported - view

    Thanks Fabio. I had a variable declared above my UDF and when I deleted it my function worked also. I guess variables are definitely not allowed!

    • Sean
    • 6 yrs agoWed, December 19, 2018 at 5:28 PM UTC
    • Reported - view

    ...Variables outside of the UDF

    • Sviluppatore Ninox
    • Fabio
    • 6 yrs agoWed, December 19, 2018 at 5:44 PM UTC
    • Reported - view

    mmhhh.. maybe not.. :)

    • blackie
    • 6 yrs agoWed, December 19, 2018 at 7:38 PM UTC
    • Reported - view

    I was also trying to define some global variables and arrays, so that is probably why my tests didn't work.

    It looks like all outside variables need to be passed to global functions in the arguments.