<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jason,<br>
<br>
it's possible to use also Java/Groovy trim methods or anything you
wish; but we have some already handy in midPoint libraries.<br>
<br>
The point is to know that during inbound processing, the original
attribute value from resource is in the variable named "input".<br>
<br>
Of course you can check the variable for null before calling some
string methods on it etc.<br>
<br>
See:
<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Script+Expression+Functions">https://wiki.evolveum.com/display/midPoint/Script+Expression+Functions</a><br>
<br>
Regards,<br>
Ivan<br>
<br>
<div class="moz-cite-prefix">On 12/08/2014 10:34 PM, Jason Everling
wrote:<br>
</div>
<blockquote
cite="mid:CAFkZXY6RgL0HWkWsoytQAce+0vJkQvVO6H5r9JZYEV35evoF3A@mail.gmail.com"
type="cite">
<div dir="ltr">You make it look so easy! I google'd forever and
tried to do it myself and it looked way more complicated than
this,
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>JASON</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Dec 8, 2014 at 3:23 PM, Ivan
Noris <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:ivan.noris@evolveum.com" target="_blank">ivan.noris@evolveum.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Jason,<br>
<br>
you can use basic.trim(variable).<br>
<br>
For inbounds, this could be for example:<br>
<br>
. . .<br>
<attribute><br>
<ref>ri:description</ref><br>
<inbound><br>
<expression><br>
<script><br>
<code>basic.trim(<b>input</b>)</code><br>
</script><br>
</expression><br>
<target><br>
<path>$user/description</path><br>
</target><br>
</inbound><br>
</attribute><br>
. . .<br>
<br>
The <b>input</b> variable contains the value from that
attribute that is being processed.<br>
<br>
Regards,<br>
Ivan
<div>
<div class="h5"><br>
<br>
<div>On 12/08/2014 09:54 PM, Jason Everling wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">Within a few of my resources that are
sql databases, when the attributes sync into
Midpoint it is also returning the extra white
spaces for example the attribute could be 8
characters but has an extra 27 spaces. I didn't
notice until I was looking at users profile in
Midpoint and when I click on the attribute it has
the spaces, same in the XML user object like
<div><br>
</div>
<div>
<div><extension xmlns:gen189="<a
moz-do-not-send="true"
href="http://whatever.com/my"
target="_blank">http://whatever.com/my</a>"></div>
<div> <gen189:profile>Editors
</gen189:profile></div>
</div>
<div><br>
</div>
<div>All the extra spaces are pulled in,</div>
<div><br>
</div>
<div>I figured there would be a way in the
attribute mapping to import the attribute
without.</div>
<div><br>
</div>
<div>JASON</div>
</div>
<br>
</div>
</div>
<font><br>
<br>
CONFIDENTIALITY NOTICE:<br>
This e-mail together with any attachments is
proprietary and confidential; intended for only the
recipient(s) named above and may contain information
that is privileged. You should not retain, copy or use
this e-mail or any attachments for any purpose, or
disclose all or any part of the contents to any
person. Any views or opinions expressed in this e-mail
are those of the author and do not represent those of
the Baptist School of Health Professions. If you have
received this e-mail in error, or are not the named
recipient(s), you are hereby notified that any review,
dissemination, distribution or copying of this
communication is prohibited by the sender and to do so
might constitute a violation of the Electronic
Communications Privacy Act, 18 U.S.C. section
2510-2521. Please immediately notify the sender and
delete this e-mail and any attachments from your
computer. </font><br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><span class="HOEnZb"><font color="#888888">
</font></span></pre>
<span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
<span class="HOEnZb"><font color="#888888"> <br>
<pre cols="72">--
Ing. Ivan Noris
Senior Identity Management Engineer
<a moz-do-not-send="true" href="http://evolveum.com" target="_blank">evolveum.com</a> <a moz-do-not-send="true" href="http://evolveum.com/blog/" target="_blank">evolveum.com/blog/</a>
_____________________________________________
"Semper Id(e)M Vix."
</pre>
</font></span></div>
<br>
_______________________________________________<br>
midPoint mailing list<br>
<a moz-do-not-send="true"
href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a moz-do-not-send="true"
href="http://lists.evolveum.com/mailman/listinfo/midpoint"
target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<font size="2"><br>
<br>
CONFIDENTIALITY NOTICE:<br>
This e-mail together with any attachments is proprietary and
confidential; intended for only the recipient(s) named above and
may contain information that is privileged. You should not
retain, copy or use this e-mail or any attachments for any
purpose, or disclose all or any part of the contents to any
person. Any views or opinions expressed in this e-mail are those
of the author and do not represent those of the Baptist School
of Health Professions. If you have received this e-mail in
error, or are not the named recipient(s), you are hereby
notified that any review, dissemination, distribution or copying
of this communication is prohibited by the sender and to do so
might constitute a violation of the Electronic Communications
Privacy Act, 18 U.S.C. section 2510-2521. Please immediately
notify the sender and delete this e-mail and any attachments
from your computer. </font><br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Ing. Ivan Noris
Senior Identity Management Engineer
evolveum.com evolveum.com/blog/
_____________________________________________
"Semper Id(e)M Vix."
</pre>
</body>
</html>