<div dir="ltr">Thanks! We are finishing up our last group of manually created accounts for this semester, another week and they will be done with new admissions. After that, I am going to add my CSV which will kickoff the automation so I have just been changing/testing a few things before hand. I added the middle initial so that in the future we shouldn't have too many iterations, just gives the username generation another option to try!<div><br></div><div>JASON</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 28, 2015 at 11:50 AM, Ivan Noris <span dir="ltr"><<a 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">
    Hi Jason,<br>
    <br>
    glad to hear it works. It seems that if you declare local name for
    object property (such as $user/additionalName), you need to use it
    instead of the object property name everywhere including the
    condition expression in the mapping, because the "original" property
    name is no more accessible as such.<br>
    <br>
    Maybe others can give more technical background info regarding this;
    but I'm happy that that wild shot advice worked for you :)<br>
    <br>
    Previously I was using the "local names" much more often as I do
    now.<br>
    <br>
    Best regards,<br>
    Ivan<div><div class="h5"><br>
    <br>
    <div>On 07/28/2015 06:36 PM, Jason Everling
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Thanks! I got it going now, removing the
        tmpAdditionalName and just using additionalName works! The last
        error wasbecause I forgot the name = within the if else
        statements for the email address.
        <div><br>
        </div>
        <div>JASON</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Jul 28, 2015 at 11:03 AM, Jason
          Everling <span dir="ltr"><<a href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Oh wait, let me check me email address
              script, that is referring to that one</div>
            <div class="gmail_extra">
              <div>
                <div><br>
                  <div class="gmail_quote">On Tue, Jul 28, 2015 at 11:02
                    AM, Jason Everling <span dir="ltr"><<a href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="ltr">Ok thanks, so I updated it and
                        removed tmpAdditionalName and just used
                        additionalName I get this now, fields look to be
                        null. It is using the script with condition
                        without but in CSV the user has a additionalName
                        <div><br>
                        </div>
                        <div>Internal Error: Synchronization error:
                          com.evolveum.midpoint.util.exception.ExpressionEvaluationException:
                          groovy.lang.MissingPropertyException: No such
                          property: name for class: Script31 expression
                          in mapping 'Generate Email Address without
                          additionalName' in
                          objectTemplate:10000000-0000-0000-0000-000000000203(User
                          Template 3)(tmpFamilyName=null;
                          additionalName=null; tmpGivenName=null; ) in
                          expression in mapping 'Generate Email Address
                          without additionalName' in
                          objectTemplate:10000000-0000-0000-0000-000000000203(User
                          Template 3)<br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div class="gmail_extra"><br>
                          <div class="gmail_quote">
                            <div>
                              <div>On Tue, Jul 28, 2015 at 10:33 AM,
                                Ivan Noris <span dir="ltr"><<a href="mailto:ivan.noris@evolveum.com" target="_blank">ivan.noris@evolveum.com</a>></span>
                                wrote:<br>
                              </div>
                            </div>
                            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                              <div bgcolor="#FFFFFF" text="#000000">
                                <div>
                                  <div> Hi Jason,<br>
                                    <br>
                                    a wild shot for now..<br>
                                    <br>
                                    Try to use tmpAdditionalName in the
                                    condition as well.<br>
                                    <br>
                                    Or, do not use tmpAdditionalName at
                                    all (use additionalName everywhere
                                    in your expressions):<br>
                                    <br>
                                          <source><br>
                                               <!--
                                    <name>tmpAdditionalName</name>
                                    --><br>
                                               
                                    <path>additionalName</path><br>
                                            </source><br>
                                    <br>
                                    Regards,<br>
                                    Ivan
                                    <div>
                                      <div><br>
                                        <br>
                                        <div>On 07/28/2015 05:24 PM,
                                          Jason Everling wrote:<br>
                                        </div>
                                      </div>
                                    </div>
                                    <blockquote type="cite">
                                      <div>
                                        <div>
                                          <div dir="ltr">I have modified
                                            my username generation based
                                            on condition additionalName
                                            (middle initial) in our case
                                            so that it uses the middle
                                            initial if present,
                                            <div><br>
                                            </div>
                                            <div>I have 2 one with
                                              condition and one without
                                              or null</div>
                                            <div><br>
                                            </div>
                                            <div>Can you take a look at
                                              the below template
                                              mappings for me.</div>
                                            <div><br>
                                            </div>
                                            <div>It does not seems to
                                              work, I get </div>
                                            <div><br>
                                            </div>
                                            <div>groovy.lang.MissingPropertyException:
                                              No such property:
                                              additionalName for class:
                                              Script24 condition in
                                              mapping 'Generate Username
                                              without additionalName'</div>
                                            <div><br>
                                            </div>
                                            <div>
                                              <div>    <mapping></div>
                                              <div>       
                                                <name>Generate
                                                Username without
                                                additionalName</name></div>
                                              <div>       
                                                <source></div>
                                              <div>           
                                                <name>tmpGivenName</name></div>
                                              <div>           
                                                <path>givenName</path></div>
                                              <div>       
                                                </source></div>
                                              <div>       
                                                <source></div>
                                              <div>           
                                                <name>tmpAdditionalName</name></div>
                                              <div>           
                                                <path>additionalName</path></div>
                                              <div>       
                                                </source></div>
                                              <div>       
                                                <source></div>
                                              <div>           
                                                <name>tmpFamilyName</name></div>
                                              <div>           
                                                <path>familyName</path></div>
                                              <div>       
                                                </source></div>
                                              <div>       
                                                <expression></div>
                                              <div>           
                                                <script></div>
                                              <div>               
                                                <code></div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>tmpGivenNameInitial

                                                =
                                                basic.stringify(tmpGivenName)?.size()
                                                &gt; 0 ? </div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>(basic.stringify(tmpGivenName)).substring(0,2)

                                                : ''</div>
                                              <div><br>
                                              </div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>if (iteration ==
                                                0) {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>if
                                                (basic.stringify(tmpFamilyName).size()
                                                &lt; 12) {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>basic.norm(basic.stringify(tmpGivenNameInitial

                                                + tmpFamilyName))</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>else {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>basic.norm(basic.stringify(tmpGivenNameInitial)

                                                +
                                                basic.stringify(tmpFamilyName)?.substring(0,
                                                12))</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>else {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>if
                                                (basic.stringify(tmpFamilyName).size()
                                                &lt; 11) {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>basic.norm(basic.stringify(tmpGivenNameInitial

                                                + tmpFamilyName)) +
                                                iterationToken</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>else {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>basic.norm(basic.stringify(tmpGivenNameInitial

                                                +
                                                tmpFamilyName?.substring(0,
                                                11))) + iterationToken</div>
                                              <div><br>
                                              </div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div>               
                                                </code><span style="white-space:pre-wrap">
                                                </span></div>
                                              <div>           
                                                </script></div>
                                              <div>       
                                                </expression></div>
                                              <div>       
                                                <target></div>
                                              <div>           
                                                <path>name</path></div>
                                              <div>       
                                                </target></div>
                                              <div>       
                                                <condition></div>
                                              <div>           
                                                <script></div>
                                              <div>               
                                                <code>additionalName
                                                == null</code></div>
                                              <div>           
                                                </script></div>
                                              <div>       
                                                </condition></div>
                                              <div>    </mapping></div>
                                              <div><br>
                                              </div>
                                              <div>    <mapping></div>
                                              <div>       
                                                <name>Generate
                                                Username with
                                                additionalName</name></div>
                                              <div>       
                                                <source></div>
                                              <div>           
                                                <name>tmpGivenName</name></div>
                                              <div>           
                                                <path>givenName</path></div>
                                              <div>       
                                                </source></div>
                                              <div>       
                                                <source></div>
                                              <div>           
                                                <name>tmpAdditionalName</name></div>
                                              <div>           
                                                <path>additionalName</path></div>
                                              <div>       
                                                </source></div>
                                              <div>       
                                                <source></div>
                                              <div>           
                                                <name>tmpFamilyName</name></div>
                                              <div>           
                                                <path>familyName</path></div>
                                              <div>       
                                                </source></div>
                                              <div>       
                                                <expression></div>
                                              <div>           
                                                <script></div>
                                              <div>               
                                                <code></div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>tmpGivenNameInitial

                                                =
                                                basic.stringify(tmpGivenName)?.size()
                                                &gt; 0 ? </div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>(basic.stringify(tmpGivenName)).substring(0,1)

                                                : ''</div>
                                              <div><br>
                                              </div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>if (iteration ==
                                                0) {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>if
                                                (basic.stringify(tmpFamilyName).size()
                                                &lt; 12) {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>basic.norm(basic.stringify(tmpGivenNameInitial

                                                + tmpAdditionalName +
                                                tmpFamilyName))</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>else {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>basic.norm(basic.stringify(tmpGivenNameInitial

                                                + tmpAdditionalName) +
                                                basic.stringify(tmpFamilyName)?.substring(0,
                                                12))</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>else {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>if
                                                (basic.stringify(tmpFamilyName).size()
                                                &lt; 11) {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>basic.norm(basic.stringify(tmpGivenNameInitial

                                                + tmpAdditionalName +
                                                tmpFamilyName)) +
                                                iterationToken</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>else {</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>basic.norm(basic.stringify(tmpGivenNameInitial

                                                + tmpAdditionalName +
                                                tmpFamilyName?.substring(0,
                                                11))) + iterationToken</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div><span style="white-space:pre-wrap">
                                                </span>}</div>
                                              <div>               
                                                </code><span style="white-space:pre-wrap">
                                                </span></div>
                                              <div>           
                                                </script></div>
                                              <div>       
                                                </expression></div>
                                              <div>       
                                                <target></div>
                                              <div>           
                                                <path>name</path></div>
                                              <div>       
                                                </target></div>
                                              <div>       
                                                <condition></div>
                                              <div>           
                                                <script></div>
                                              <div>               
                                                <code>additionalName
                                                != null</code></div>
                                              <div>           
                                                </script></div>
                                              <div>       
                                                </condition></div>
                                              <div>    </mapping></div>
                                            </div>
                                            <div>
                                              <div><br>
                                              </div>
                                              -- <br>
                                              <div>
                                                <div dir="ltr">JASON</div>
                                              </div>
                                            </div>
                                          </div>
                                          <br>
                                        </div>
                                      </div>
                                      <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></fieldset>
                                      <br>
                                      <pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><span><font color="#888888">
</font></span></pre>
                                      <span><font color="#888888"> </font></span></blockquote>
                                  </div>
                                </div>
                                <span><font color="#888888"> <br>
                                    <pre cols="72">-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer & IDM Architect
  <a href="http://evolveum.com" target="_blank">evolveum.com</a>                     <a href="http://evolveum.com/blog/" target="_blank">evolveum.com/blog/</a>
  ___________________________________________________
  "Semper Id(e)M Vix."
</pre>
                                  </font></span></div>
                              <br>
                              <span>_______________________________________________<br>
                                midPoint mailing list<br>
                                <a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
                                <a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
                                <br>
                              </span></blockquote>
                          </div>
                          <span><font color="#888888"><br>
                              <br clear="all">
                              <div><br>
                              </div>
                              -- <br>
                              <div>
                                <div dir="ltr">JASON</div>
                              </div>
                            </font></span></div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <div><br>
                  </div>
                </div>
              </div>
              <span><font color="#888888">-- <br>
                  <div>
                    <div dir="ltr">JASON</div>
                  </div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div>
          <div dir="ltr">JASON</div>
        </div>
      </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></fieldset>
      <br>
      <pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
    <pre cols="72">-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer & IDM Architect
  <a href="http://evolveum.com" target="_blank">evolveum.com</a>                     <a href="http://evolveum.com/blog/" target="_blank">evolveum.com/blog/</a>
  ___________________________________________________
  "Semper Id(e)M Vix."
</pre>
  </div></div></div>

<br>_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">JASON</div></div>
</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>