Text separation

NESTOR RODRIGO is what that expression gives me.

I’d be happy to look at you app if you’re interested, though it probably wouldn’t be until tomorrow. To give me access, from the app editor, go to Users in the left-side navigation, select the Users tab, enter my email (sc2758g@gmail.com), set Add as co-authors? to ON, and click Add user + send invite. You will remove my access from the same location.

Thank you very much @Steve, but I managed to make it work.
ScanDNI was as a Text type and that caused the line break to be lost, I configured it as Long Text and it worked perfectly.

1 Like

@Steve I copied the expressions in another app, and when I set the ScanDNI column as Long Text, it does not allow me to activate the “Scannable” option and it shows the following error:

I don’t know why that would happen. @Aleksi, do you?

I also have a split question.
I have a prescription
[refraction] = -1.00 -0.75 x 155
I want to split into 3 fields and store in 3 different rows
row 1 = -1.00
row 2 = -0.75
row 3 = 155

I tried INDEX(SPLIT([refraction],"

It didn’t work. It didn’t split it.


That’s because your text is not delimited by a newline, it is delimited by spaces, and an ‘x’. You should try @Bahbus’s expression. But this should work as well:

val1= INDEX( SPLIT( [refraction] , " " ) , 1 )
val2= INDEX( SPLIT( [refraction] , " " ) , 2 )
val3= INDEX( SPLIT( [refraction] , " " ) , 4 )

Take notice that the 3rd value is the 4th index, because the ‘x’ character is the 3rd when splitting by a space. This of course assumes that your [refraction] text will always come in like:

“val1 val2 x val3”


Thank you. It worked. However, in my refraction, I will sometimes have a + instead of -.
For example,
+5.00 -2.00 x 180 converts to +5.50 -1.75 x 180
I need to split them to do a calculation and put them back together. Is there any way I can keep the + during the calculation? Right now, I split them up. I calculate them and then concatenate them back together. However, the only way I can put back the +5.50 is by converting it into a text and adding a “+” in front of it.

No. And you might need to get rid of it to do any math calculations, use NUMBER() or DECIMAL() to convert text into numbers.

Sounds like you’ve got it.