<?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 How to combine different statuses into one field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-combine-different-statuses-into-one-field/m-p/1853776#M70486</link>
    <description>&lt;P&gt;I work with contracts that are sent to external users for digital signing. One document must be signed by 2 people, one "leader", one "member"&lt;/P&gt;
&lt;P&gt;I want a table that shows all documents that are being processed&amp;nbsp; and detect the person that has not signed.&lt;/P&gt;
&lt;P&gt;The table is similar to:&lt;/P&gt;
&lt;P&gt;Left join (DOCUMENT)&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MEMBER,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEADER,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; STATUS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(WILDMATCH(STATUS,'*SIGNED*')=1,1,0) AS SIGNED.1.0,&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;BASE&lt;/P&gt;
&lt;P&gt;(qvd);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need one field that tells me if the member has signed, or the leader has signed or if none has signed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ive tried multiple things, but they end up giving me duplicates of the document, with one row for the member and another for the leader&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Left join (Document)&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;if(len(trim([LEADER]))&amp;gt;0 and SIGNED.1.0=1 ,'LEADER',&lt;BR /&gt;if(len(trim(MEMBER))&amp;gt;0 and SIGNED.1.0=1 ,'MEMBER',&lt;BR /&gt;if((len(trim(LEADER))&amp;gt;0 and SIGNED.1.0=0) AND (len(trim(MEMBER))&amp;gt;0 and SIGNED.1.0=0),'NONE'))) as WHO.SIGNED&lt;/P&gt;
&lt;P&gt;Resident Document;&lt;/P&gt;
&lt;P&gt;Or master item:&lt;/P&gt;
&lt;P&gt;=if(len(trim(LEADER))&amp;gt;0 and [SIGNED.1.0]=1 ,'YES')&lt;/P&gt;
&lt;P&gt;This gives duplicates and if I try to use the "Include null values" it removes all the documents where the MEMBER has signed. I need both...&lt;/P&gt;
&lt;P&gt;Anyone?&lt;/P&gt;</description>
    <pubDate>Fri, 29 Oct 2021 17:16:06 GMT</pubDate>
    <dc:creator>HegeS</dc:creator>
    <dc:date>2021-10-29T17:16:06Z</dc:date>
    <item>
      <title>How to combine different statuses into one field</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-combine-different-statuses-into-one-field/m-p/1853776#M70486</link>
      <description>&lt;P&gt;I work with contracts that are sent to external users for digital signing. One document must be signed by 2 people, one "leader", one "member"&lt;/P&gt;
&lt;P&gt;I want a table that shows all documents that are being processed&amp;nbsp; and detect the person that has not signed.&lt;/P&gt;
&lt;P&gt;The table is similar to:&lt;/P&gt;
&lt;P&gt;Left join (DOCUMENT)&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MEMBER,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEADER,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; STATUS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(WILDMATCH(STATUS,'*SIGNED*')=1,1,0) AS SIGNED.1.0,&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;BASE&lt;/P&gt;
&lt;P&gt;(qvd);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need one field that tells me if the member has signed, or the leader has signed or if none has signed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ive tried multiple things, but they end up giving me duplicates of the document, with one row for the member and another for the leader&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Left join (Document)&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;if(len(trim([LEADER]))&amp;gt;0 and SIGNED.1.0=1 ,'LEADER',&lt;BR /&gt;if(len(trim(MEMBER))&amp;gt;0 and SIGNED.1.0=1 ,'MEMBER',&lt;BR /&gt;if((len(trim(LEADER))&amp;gt;0 and SIGNED.1.0=0) AND (len(trim(MEMBER))&amp;gt;0 and SIGNED.1.0=0),'NONE'))) as WHO.SIGNED&lt;/P&gt;
&lt;P&gt;Resident Document;&lt;/P&gt;
&lt;P&gt;Or master item:&lt;/P&gt;
&lt;P&gt;=if(len(trim(LEADER))&amp;gt;0 and [SIGNED.1.0]=1 ,'YES')&lt;/P&gt;
&lt;P&gt;This gives duplicates and if I try to use the "Include null values" it removes all the documents where the MEMBER has signed. I need both...&lt;/P&gt;
&lt;P&gt;Anyone?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 17:16:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-combine-different-statuses-into-one-field/m-p/1853776#M70486</guid>
      <dc:creator>HegeS</dc:creator>
      <dc:date>2021-10-29T17:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine different statuses into one field</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-combine-different-statuses-into-one-field/m-p/1853901#M70501</link>
      <description>&lt;P&gt;Hi, you need to detect where the duplicates comes, maybe&amp;nbsp; it's in the 'BASE' table where there are more than one record for each ID, in that case you can do a previous load to keep only one row by ID, somethinglike:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;BASE_JOINED:
LOAD
    ID,
    MEMBER,
    MEMBER_STATUS,
    IF(WILDMATCH(STATUS,'*SIGNED*')=1,1,0) AS MEMBER_SIGNED.1.0,
FROM
BASE(qvd)
WHERE not IsNull(MEMBER);

Left Join(BASE_JOINED)
LOAD
    ID,
    LEADER,
    LEADER_STATUS,
    IF(WILDMATCH(STATUS,'*SIGNED*')=1,1,0) AS LEADER_SIGNED.1.0,
FROM
BASE(qvd)
WHERE not IsNull(LEADER);&lt;/LI-CODE&gt;
&lt;P&gt;If each ID has more than one MEMBER or LEADER you will need some extra logic to avoid duplicates, maybe just addind a composite key by ID and MEMBER or LEADER and use Exists() to avoid loading duplicates.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Oct 2021 07:46:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-combine-different-statuses-into-one-field/m-p/1853901#M70501</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-10-31T07:46:30Z</dc:date>
    </item>
  </channel>
</rss>

