Trim function available from data transformation GUI?

67 views
Skip to first unread message

cjoh...@gmail.com

unread,
Dec 12, 2013, 1:46:21 PM12/12/13
to Ensemble-in...@googlegroups.com
Hey all,

I am generating HL7 messages populated from a CSV file. Some of the fields in the CSV file have trailing spaces which I'd like to get rid of. I see a TRIM function in the Cache documentation, but it seems to be used in the context of SQL statements.

Does anyone know of a function that can be used in a data transformation that will remove the leading and trailing spaces from a field? I would appreciate any help that anyone can provide.

Thanks.

Tom Longmoore

unread,
Dec 12, 2013, 2:01:07 PM12/12/13
to Ensemble-in...@googlegroups.com
Would the Strip() function work here?

http://docs.intersystems.com/ens20122/csp/docbook/DocBook.UI.Page.cls?KEY=EGDV_create#EGDV_prod_utility_functions_builtin

Based on the documentation, it would seem that Strip() works like the $ZSTRIP function in ObjectScript. If so, you could put something like Strip(my_string,"<>W") to remove leading and trailing whitespace.

Andy Picou

unread,
Dec 12, 2013, 1:51:51 PM12/12/13
to Ensemble-in...@googlegroups.com

$ZSTRIP as in:   $zstrip(wValue,"<>W")

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

cjoh...@gmail.com

unread,
Dec 13, 2013, 1:24:51 PM12/13/13
to Ensemble-in...@googlegroups.com
Thanks very much. These replies answered my questions and helped me understand Objectscript and the documentation better.

Incidentally, $ZSTRIP() worked but STRIP() threw an error.

Thanks.


On Thursday, December 12, 2013 1:46:21 PM UTC-5, cjoh...@gmail.com wrote:

David Loveluck

unread,
Dec 13, 2013, 1:28:17 PM12/13/13
to Ensemble-in...@googlegroups.com

Strip() is available as a function in Rules and DTL. It is not available from COS.

 

dave

 


Sent: Friday, December 13, 2013 1:25 PM
To: Ensemble-in...@googlegroups.com

--

Reply all
Reply to author
Forward
0 new messages