Substring functions

Is the function substring-before() now working in KoboCollect?
Is there an equivalent function as the find() in Excel?


You may check this (and tell the community?):

  • using the XLSForm Online Validator (will show you if it is working for ODKCollect and Enketo)
  • trying to deploy in KoBo (for KoboCollect)
  • trying to Preview in Enketo (for Enketo)…

There is a complex workaround (with regex):

To check for a substring or letter in a given string, contains() function may help you. But unfortunately not providing the position, only boolean.

If your string is numeric or can be casted to numeric, you could work with numeric functions/operators to cut of parts, like mod or div.

You might even create a complex workaround to find a position by using a repetitive combination of if, string-length, substring.

1 Like

@csteen, kindly please be informed that substring-before should now work with KoBoToolbox. FYI, please follow the post discussed previously: