0

A text function that does not work…

Hi

 

I try to extract the word "Ara" from a list of compound words where it is contained :

 

Blue Ara

Ara macaw

Red Ara

 

I found that in the Ninox notice :

"Converts any value to a string representation possibly reflecting the format option of its field settings. If there’s no value, the result will be the empty string: "".

text("Hello") => "Hello"

 

So I tried that text  funtion :

 

text("Ara")

 

But it does not work.

 

Can someone help me ?

 

Thanks

4 replies

null
    • Fred
    • 3 yrs ago
    • Reported - view

    The text function only converts a field into text. So if you have a number field you can convert it into a text string.

    You can do something like this:

    let xtest := index(Text, "Ara"); <---find the position where the text Ara starts
    if xtest > -1 then <--checks to make sure we only pull data out of fields that have Ara in it
    substr(Text, xtest, 3) <--pulls out a string from the field called Text starting that point set in xtest and going out 3 spaces since we know Ara is 3 letters long
    end

    • Addinsell
    • 3 yrs ago
    • Reported - view

    Thank you Fred

    Do I have to create a button linked to this function ?

    • Addinsell
    • 3 yrs ago
    • Reported - view

    Anyway I typed that script in a formula field and I have this mention :823E865B-7797-4255-B402-27EEA0CC571A

    "a column has not been found Text on the line 1, column 23"

    • Fred
    • 3 yrs ago
    • Reported - view

    look at the substr formula. do you have a field called Text? if you don't, then what do you need to put there?