Discussions

Expand all | Collapse all

Text List Cannot Be Used In A Formula?

  • 1.  Text List Cannot Be Used In A Formula?

    Posted 05-22-2016 20:59

    So, the new "text list" field type cannot be used in a formula?



  • 2.  RE: Text List Cannot Be Used In A Formula?

    Posted 05-22-2016 21:15
    If you use

    ToText([My Multi-Select field])

    then it will be a text in a formula.


  • 3.  RE: Text List Cannot Be Used In A Formula?

    Posted 03-06-2019 20:21
    I tried this, except i get an error basically stating that the ToText() function does not support conversions from a textlist (It basically says it is looking for text, numbers, bools, etc. but found textlist)


  • 4.  RE: Text List Cannot Be Used In A Formula?

    Posted 03-06-2019 20:25
    The formula will save just fine. The formula editor has a bug in it which is giving a false warning.


  • 5.  RE: Text List Cannot Be Used In A Formula?

    Bronze
    Contributor
    Posted 04-19-2019 16:21
    This is not true. The error no longer saves the formula and does not implement.
    For example this does not work.

    If(Contains([Eye Wear Type(s)],ToText([Eye Wear Type(s)])))




  • 6.  RE: Text List Cannot Be Used In A Formula?

    Posted 04-19-2019 16:29
    Jim you might have to also do this... Give it a try. That is my best guess since Contains is supposed to work with a text field, that is probably where the error was. IF this one does not work then I will test it myself.

    If(Contains(ToText([Eye Wear Type(s)]),ToText([Eye Wear Type(s)])))


  • 7.  RE: Text List Cannot Be Used In A Formula?

    Bronze
    Contributor
    Posted 04-19-2019 16:46
    Yeah, tried that too. Noped.


  • 8.  RE: Text List Cannot Be Used In A Formula?

    Posted 04-19-2019 16:52
    I don�t understand in English what you are trying to test for. The formula looks incomplete.


  • 9.  RE: Text List Cannot Be Used In A Formula?

    Posted 04-19-2019 16:56
    I have again recently tested with converting a Text List using ToText() and it worked fine for me, Jim maybe there is another area of your formula that is causing the data type error. If there is more to your formula than the line you commented above can you show it?


  • 10.  RE: Text List Cannot Be Used In A Formula?

    Bronze
    Contributor
    Posted 04-19-2019 17:08
    Here's the entire thingy. I commented out all the other code to pinpoint only that one piece of code and it doesn't work.

    //21 fields
    //List(", ",
    //If([Acid Suit],"Acid Suit"),
    //If(Contains([Boot Type(s)], ToText([Boot Type(s)])),
    //If(ToText([Eye Wear Type(s)])
    //If([Face Shield],"Face Shield"),
    //If([Fall Arrest System],"Fall Arrest System"),
    //If([Fire Retardant],"Fire Retardant"),
    //If([Hard Hat],"Hard Hat"),
    //If([Hearing Protection],"Hearing Protection"),
    //If([Kevlar Sleeves],"Kevlar Sleeves"),
    //If([Metatarsal Guards],"Metatarsal Guards"),
    //If([Reflective Vest],"Reflective Vest"),
    //If([Respirator],"Respirator"),
    //If([Rubber Boots],"Rubber Boots")
    //)
    //&
    If(Contains(ToText([Eye Wear Type(s)]),ToText([Eye Wear Type(s)])))
    //& If([Boots], ", Boots: " & [Boot Type(s)])
    //& If([Gloves],", Gloves: " & [Glove Type(s)])

    Plain english:
    If the multi-select field named Eye Wear Type(s)_ has any selections checked, then display those selections in this formula rich text field.


  • 11.  RE: Text List Cannot Be Used In A Formula?

    Posted 04-19-2019 17:20
    Try this

    If(ToText([Eye Wear Type(s)]),<> "", ToText([Eye Wear Type(s)])),


  • 12.  RE: Text List Cannot Be Used In A Formula?

    Bronze
    Contributor
    Posted 04-19-2019 17:37
    Yeuss!!
    If(ToText([Eye Wear Type(s)])<>"", ToText([Eye Wear Type(s)]))



  • 13.  RE: Text List Cannot Be Used In A Formula?

    Posted 04-19-2019 17:18
    Why not make a formula text field that parses the multi-select and returns the types minus the semi-colons.

    BTW alot of my old formulas using ToText(multi-select field) have broken recently.


  • 14.  RE: Text List Cannot Be Used In A Formula?

    Bronze
    Contributor
    Posted 04-19-2019 17:46
    Because that negates the multi-select and I might as well use check boxes. A multi-select is a way to clean up the form from a buzillion check boxes. I have no interest in parsing and then having to maintain that parse. Maybe this would be a little less painful if they would allow array 0-19 instead so we don't have to target specific select options based upon name.

    Anyhow Coach found the workaround until QB fixes the root.