Hi, In xlsforms, i am trying to split a string(barcode) by (;) delimiter. I only found a exp for separate by positions substr(${Barcode2},8,25). Someone knows a expression for this.? Thanks

1176
5
04-12-2017 07:38 AM
Highlighted
New Contributor II

Hi, In xlsforms, i am trying to split a string(barcode) by (;) delimiter. I only found a exp for separate by positions substr(${Barcode2},8,25). Someone knows a expression for this.? Thanks

5 Replies
Highlighted
Esri Esteemed Contributor

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.

Highlighted
Occasional Contributor

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.

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

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.

Highlighted
Occasional Contributor

Many thanks for the fast reply! I will look into this function. 

Reply
0 Kudos
Highlighted
New Contributor III

Hi Hélène, did you managed to achieve a workaround using the javascript functionality?

Many thanks

Josh

Reply
0 Kudos