<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Javier,</p>
    <p>yes, you can use ranges to fix that:</p>
    <p>                <attribute><br>
                          <ref>ri:department</ref><br>
                          <displayName>Department
      name</displayName><br>
                          <limitations><br>
                              <access><br>
                                  <read>true</read><br>
                                  <add>false</add><br>
                                  <modify>false</modify><br>
                              </access><br>
                          </limitations><br>
                          <inbound><br>
                            <target><br>
                             
      <path>organizationalUnit</path><br>
      <b>                        <!-- Range used to REPLACE instead
        of ADD the value</b><b><br>
      </b><b>                        (organizationalUnit is multi-value)
        --></b><b><br>
      </b><b>                        <set></b><b><br>
      </b><b>                           
        <predefined>all</predefined></b><b><br>
      </b><b>                        </set></b><br>
                            </target><br>
                          </inbound><br>
    </p>
    <p>                </attribute><br>
    </p>
    <p>See also:
<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Inbound+Mapping#InboundMapping-RangeOfInboundMappings">https://wiki.evolveum.com/display/midPoint/Inbound+Mapping#InboundMapping-RangeOfInboundMappings</a></p>
    <p>See also:
      <a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Mapping#Mapping-MappingRange">https://wiki.evolveum.com/display/midPoint/Mapping#Mapping-MappingRange</a></p>
    <p>I think the default was changed between 3.9 and 4.0.</p>
    <p>Best regards,</p>
    <p>Ivan<br>
    </p>
    <div class="moz-cite-prefix">On 17. 6. 2020 16:23, Javier Martinez
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFFw27cT8Vh-t760tR37jhj-6VDqkmWXk=hebsy3u8riUEHZKw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>
          <div><span style="color:rgb(32,33,36);font-family:Roboto,sans-serif;font-size:14px;white-space:pre-wrap">Hi,</span></div>
          <div><span style="color:rgb(32,33,36);font-family:Roboto,sans-serif;font-size:14px;white-space:pre-wrap">We are having an issue when having an inbound mapping from a single-valued attribute to a multi-valued attribute.
When modifying the value from the resource, instead of replacing the value, it is adding new values to the attribute in midPoint. Tested with attr</span><span style="color:rgb(32,33,36);font-family:Roboto,sans-serif;font-size:14px;white-space:pre-wrap">ibutes "organization" and "subtype".</span></div>
          <div><span style="color:rgb(32,33,36);font-family:Roboto,sans-serif;font-size:14px;white-space:pre-wrap">Working OK in midpoint 3.9, but failing with midpoint 4.0.1 and above.</span></div>
          <div><span style="color:rgb(32,33,36);font-family:Roboto,sans-serif;font-size:14px;white-space:pre-wrap">
Is there any way to keep this issue from happening?</span></div>
          <div><span style="color:rgb(32,33,36);font-family:Roboto,sans-serif;font-size:14px;white-space:pre-wrap">Regards</span></div>
        </div>
        <div>-- <br>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">
            <div dir="ltr">
              <div><font style="font-size:12.8px" face="arial,
                  helvetica, sans-serif"><font
                    style="background-color:rgb(255,255,255)"
                    color="#000000">Javier Martínez</font></font></div>
              <font style="font-size:12.8px" face="arial, helvetica,
                sans-serif"><font color="#999999">Identicum S.A.</font><br>
                <font color="#999999">Jorge Newbery 3226</font><br>
                <font color="#999999">Tel: +54 (11) 4552-3050</font><br>
                <font color="#999999"><a
                    href="http://www.identicum.com/"
                    style="color:rgb(17,85,204)" target="_blank"
                    moz-do-not-send="true">www.identicum.com</a></font></font>
              <div><font style="font-size:12.8px" face="arial,
                  helvetica, sans-serif"><br>
                </font></div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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="https://lists.evolveum.com/mailman/listinfo/midpoint">https://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Ivan Noris
Senior Identity Engineer
evolveum.com
</pre>
  </body>
</html>