<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Complicated MAPPING  and tmap exppression in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Complicated-MAPPING-and-tmap-exppression/m-p/2272045#M49436</link>
    <description>&lt;P&gt;I have a mapping here and I'm thinking of how can I transform the data in a right way using tmap expression, I will explain what I want to do, but below is the tmap:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1bp.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137380iB28E786ABE805CA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1bp.png" alt="0683p000009M1bp.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;That tmap shows very simple but, the data samples are&lt;/P&gt; 
&lt;P&gt;regnumber - 123456, 123457,123458 with dash between 3 numbers, so all my data contains 6 characters/integer.&lt;/P&gt; 
&lt;P&gt;regcode - this is the code like 1,2 or 3&lt;/P&gt; 
&lt;P&gt;regaddress, - 3 kinds of values&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1. the usual or right address&lt;/P&gt; 
&lt;P&gt;2. merging - meaning the registered address merged on other regnumber&lt;/P&gt; 
&lt;P&gt;3. Close - the account or regnumber is closed.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;regbranch 3 kinds of values:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1. usual branch on where the user registered&lt;/P&gt; 
&lt;P&gt;2. refer to reg_number 123-456 or refer reg_number 123-456&lt;/P&gt; 
&lt;P&gt;3. (Move Agency&amp;nbsp; to 123-456)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;regkey - unique key&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;regremarks - this should contains data from regaddress and regbranch if the values is not the usual add or branchmeaning the values is on2and 3 kinds of values&lt;/P&gt; 
&lt;P&gt;regstatus - chould have the data from&amp;nbsp;&lt;SPAN&gt;regaddress&amp;nbsp; if merging then MG, if Closed then CL else Active - I did this already&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;regflag -&amp;nbsp; not so important.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;My question is how can I do this transformation on expression.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if regbranch values is not a usual branch name either on this 2:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2. refer to reg_number 123-456 or refer reg_number 123-456&lt;/P&gt; 
&lt;P&gt;3. (Move Agency&amp;nbsp; to 123-456)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then&amp;nbsp;the regaddress is close don't save and put the regbranch values to regremarks then put the regbranch and regaddress to '' or null.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if regadress is merging and the data is either on this 2:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2. refer to reg_number 123-456 or refer reg_number 123-456&lt;/P&gt; 
&lt;P&gt;3. (Move Agency&amp;nbsp; to 123-456)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if the number is refer to123-456&amp;nbsp; or any refer to (123,457,123-458) then remove the dash and search if the 123456 is existing or exists on regnumber column&lt;SPAN&gt;, then put the 123456 on reg_refer_number column. But if not exists then make the regaddress null and put the whole : Refer to including&amp;nbsp;the numbers on regremarks column.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if the number is &amp;nbsp;(Move Agency&amp;nbsp; to 123-456)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; or any Move Agency to (123,457,123-458) then remove the dash and search if the 123456 is existing or exists on regnumber column&lt;/SPAN&gt;&lt;SPAN&gt;, if exists then put the 123456 on reg_agency_number column. But if not exists then make the regaddress null and put the whole : (Move to Agency to including&amp;nbsp;the numbers on regremarks column.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Second twists is that:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;For example 123456 (for Refer to) values has been added on the next delta run, then the 123456 should be added or modify on&amp;nbsp;reg_refer_number&amp;nbsp;as this is existing or exists now. -&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;same with another one:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if 123456 (for Refer to) values has been added on the next delta run, then the 123456 should be added or modify on&amp;nbsp;reg_agency_number&amp;nbsp;as this is existing or exists now.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;If 123456 deleted then modify it again and remove the values on&amp;nbsp;reg_refer_number&amp;nbsp;and&amp;nbsp;reg_agency_number.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;i'm thinking if how can I do this using tmap expression and using filtering or catch output, etc.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;can someone enlighten me or give a sample idea on how can I do this?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Nov 2018 17:05:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-11-24T17:05:55Z</dc:date>
    <item>
      <title>Complicated MAPPING  and tmap exppression</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Complicated-MAPPING-and-tmap-exppression/m-p/2272045#M49436</link>
      <description>&lt;P&gt;I have a mapping here and I'm thinking of how can I transform the data in a right way using tmap expression, I will explain what I want to do, but below is the tmap:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1bp.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137380iB28E786ABE805CA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1bp.png" alt="0683p000009M1bp.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;That tmap shows very simple but, the data samples are&lt;/P&gt; 
&lt;P&gt;regnumber - 123456, 123457,123458 with dash between 3 numbers, so all my data contains 6 characters/integer.&lt;/P&gt; 
&lt;P&gt;regcode - this is the code like 1,2 or 3&lt;/P&gt; 
&lt;P&gt;regaddress, - 3 kinds of values&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1. the usual or right address&lt;/P&gt; 
&lt;P&gt;2. merging - meaning the registered address merged on other regnumber&lt;/P&gt; 
&lt;P&gt;3. Close - the account or regnumber is closed.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;regbranch 3 kinds of values:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1. usual branch on where the user registered&lt;/P&gt; 
&lt;P&gt;2. refer to reg_number 123-456 or refer reg_number 123-456&lt;/P&gt; 
&lt;P&gt;3. (Move Agency&amp;nbsp; to 123-456)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;regkey - unique key&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;regremarks - this should contains data from regaddress and regbranch if the values is not the usual add or branchmeaning the values is on2and 3 kinds of values&lt;/P&gt; 
&lt;P&gt;regstatus - chould have the data from&amp;nbsp;&lt;SPAN&gt;regaddress&amp;nbsp; if merging then MG, if Closed then CL else Active - I did this already&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;regflag -&amp;nbsp; not so important.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;My question is how can I do this transformation on expression.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if regbranch values is not a usual branch name either on this 2:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2. refer to reg_number 123-456 or refer reg_number 123-456&lt;/P&gt; 
&lt;P&gt;3. (Move Agency&amp;nbsp; to 123-456)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then&amp;nbsp;the regaddress is close don't save and put the regbranch values to regremarks then put the regbranch and regaddress to '' or null.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if regadress is merging and the data is either on this 2:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2. refer to reg_number 123-456 or refer reg_number 123-456&lt;/P&gt; 
&lt;P&gt;3. (Move Agency&amp;nbsp; to 123-456)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if the number is refer to123-456&amp;nbsp; or any refer to (123,457,123-458) then remove the dash and search if the 123456 is existing or exists on regnumber column&lt;SPAN&gt;, then put the 123456 on reg_refer_number column. But if not exists then make the regaddress null and put the whole : Refer to including&amp;nbsp;the numbers on regremarks column.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if the number is &amp;nbsp;(Move Agency&amp;nbsp; to 123-456)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; or any Move Agency to (123,457,123-458) then remove the dash and search if the 123456 is existing or exists on regnumber column&lt;/SPAN&gt;&lt;SPAN&gt;, if exists then put the 123456 on reg_agency_number column. But if not exists then make the regaddress null and put the whole : (Move to Agency to including&amp;nbsp;the numbers on regremarks column.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Second twists is that:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;For example 123456 (for Refer to) values has been added on the next delta run, then the 123456 should be added or modify on&amp;nbsp;reg_refer_number&amp;nbsp;as this is existing or exists now. -&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;same with another one:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if 123456 (for Refer to) values has been added on the next delta run, then the 123456 should be added or modify on&amp;nbsp;reg_agency_number&amp;nbsp;as this is existing or exists now.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;If 123456 deleted then modify it again and remove the values on&amp;nbsp;reg_refer_number&amp;nbsp;and&amp;nbsp;reg_agency_number.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;i'm thinking if how can I do this using tmap expression and using filtering or catch output, etc.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;can someone enlighten me or give a sample idea on how can I do this?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Nov 2018 17:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Complicated-MAPPING-and-tmap-exppression/m-p/2272045#M49436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-24T17:05:55Z</dc:date>
    </item>
  </channel>
</rss>

