I am trying to split either a text formula field or a multiple choice field by the comma within the array. Example:
Amer Sign Lang Seg A*, 123456789
I want the course number to be pulled out of the array and go in its own field. Any help is highly appreciated! Thanks!
Hi @Dan3, unfortunately Knack doesn’t have a
split() function in its text formula field. I’d suggest logging this as a feature request if no one else has already.
The alternative is that you store your courses in another table with fields for Course Name and Course Number, along with a concatenated ‘Course Name, Course Number’ field. You can then connect it via a Connection field to your other table, and pull in the name and course number fields separately into your views.
Does that make sense?
Maybe there is a Regex expert who might be able to help you here? To extract the course number you’d probably want to use a positive lookbehind assertion like “(?<=').+” but I can’t get it to work in Knack, sorry.
@StephenChapman It does make sense. Thats the way I initially had this setup, but our students need to be able to choose multiple courses from that item and I believe Connection fields only allow one selection at a time. I will definitely add split() to a feature request! Thank you very much!
Thanks for the effort @Dean2
We will figure something out!
@Dan3 you can set up many to many relationships connection fields like so:
@StephenChapman YOU ARE MY ABSOLUTE HERO!!! This has made sooooooo many things possible! Thank you so much!