Hi Priscila,
There currently isn't a function that can separate text based on a delimiter in the XLSForm specification. We have given a bit of thought on this, but it will be a while before we approach this with a workaround.
Hi James,
Do you have any update on this topic?
Our customers would also need us to use this functionnality, to extract fieldworker's initials from their property('username'). The split would then be on the "." character, and we would chain sustr() and split functions.
Many thanks!
Hélène.
Hi Hélène,
There is not a function in the XLSForms specification that directly supports this. That being said, it is possible to use a custom JavaScript function (beta functionality documented in the Early Adopter Community) to create a function to split text like the username.
Many thanks for the fast reply! I will look into this function.
@JamesTedrick How long before the substring-before XLSForms function (from ODK, per W3C XForms standard) is implemented into Survey123 Connect? Since custom JavaScript functions cannot be used in public surveys, this would be very helpful as a split/parse function.
@JamesTedrick Do you have a direct link or name of the Custom Java script example that is used to split text from a multiline question?
Thanks