<?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 Re: Formatting key fields? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683098#M52011</link>
    <description>Hi,&lt;BR /&gt;Two things,&lt;BR /&gt;1) I would use the same logic on all the KEY fields.&lt;BR /&gt;2) I would identify the KEY field as ????_Key and create [Part Number] as a new field in one of the tables. Then show [Part number] in the chart and not the KEY.&lt;BR /&gt;Hope this helps</description>
    <pubDate>Tue, 10 Mar 2020 06:38:41 GMT</pubDate>
    <dc:creator>johngouws</dc:creator>
    <dc:date>2020-03-10T06:38:41Z</dc:date>
    <item>
      <title>Formatting key fields?</title>
      <link>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683045#M52002</link>
      <description>&lt;P&gt;I have a field called [Part Number].&amp;nbsp; It is 8 digits and may contain leading zeros.&amp;nbsp; Therefore, I used the Text() function to make sure it is displayed as text.&amp;nbsp; But this field is a key field that is used to associate multiple tables.&amp;nbsp; So do I need to use Text() for that field in each table?&amp;nbsp; What if I did Text() on one table and forgot to do it to another?&amp;nbsp; Or what if I did Num() on the other table by accident instead?&amp;nbsp; It seems like an opportunity to provide Qlik with conflicting instructions.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table1:
LOAD
   Text([Part Number]) AS [Part Number],
    ...

Table2:
LOAD
   Text([Part Number]) AS [Part Number],
    ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also wonder about it for script joins.&amp;nbsp; For instance, when I tried this, the join did not work correctly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table1:
LOAD
   Text([Part Number]) AS [Part Number],
   ...

LEFT JOIN(Table1)
LOAD
   [Part Number],
   ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best practice here?&lt;/P&gt;&lt;P&gt;And is the advice the same for other types of key fields, such as dates?&amp;nbsp; Like should I do be doing this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table1:
LOAD
   Date([Order Date]) AS [Order Date],
    ...

Table2:
LOAD
   Date([Order Date]) AS [Order Date],
    ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:32:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683045#M52002</guid>
      <dc:creator>mmarchese</dc:creator>
      <dc:date>2021-12-20T21:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting key fields?</title>
      <link>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683098#M52011</link>
      <description>Hi,&lt;BR /&gt;Two things,&lt;BR /&gt;1) I would use the same logic on all the KEY fields.&lt;BR /&gt;2) I would identify the KEY field as ????_Key and create [Part Number] as a new field in one of the tables. Then show [Part number] in the chart and not the KEY.&lt;BR /&gt;Hope this helps</description>
      <pubDate>Tue, 10 Mar 2020 06:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683098#M52011</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2020-03-10T06:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting key fields?</title>
      <link>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683105#M52013</link>
      <description>&lt;P&gt;The thumb rule is to have the key fields defined in the same format, if not they will not be considered as same and would fail in linking&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 07:18:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683105#M52013</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2020-03-10T07:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting key fields?</title>
      <link>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683260#M52029</link>
      <description>&lt;P&gt;Johngouws:&lt;/P&gt;&lt;P&gt;Interesting.&amp;nbsp; It seems a bit wasteful memory-wise but safer association-wise.&amp;nbsp; Is that your reason for doing it?&lt;/P&gt;&lt;P&gt;Do you do this with every key field that the user has an interest in seeing on the interface?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 12:24:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683260#M52029</guid>
      <dc:creator>mmarchese</dc:creator>
      <dc:date>2020-03-10T12:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting key fields?</title>
      <link>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683274#M52033</link>
      <description>&lt;P&gt;Well , if the concern is with regard to memory , much better option is to use the autonumber function so that the keyfield gets reduced to a number and you may use it for association making it a key field&amp;nbsp; and the ones that you need on interface, you may keep it the way you want to.&lt;/P&gt;&lt;P&gt;Hope this is clear.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 12:39:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1683274#M52033</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2020-03-10T12:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting key fields?</title>
      <link>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1701226#M53687</link>
      <description>&lt;P&gt;To partially answer my own question, regarding joining fields that consist of formatted numbers, I experimented and found:&lt;/P&gt;&lt;P&gt;1) Formatting does not hinder joins&lt;/P&gt;&lt;P&gt;2) When there is a formatting conflict, the earliest one in the script wins&lt;/P&gt;&lt;P&gt;Test code and result:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;A:
LOAD
    Date(dt, 'WWW YYYY-MM-DD') AS dt,
    val
INLINE [
    dt, val
    40000, 11
];

LEFT JOIN(A)
LOAD
    Date(dt, 'YY-MM-DD') AS dt,
    val2
INLINE [
    dt, val2
    40000, 22
];

C:
LOAD
    Date(dt, 'MM/DD/YYYY') AS dt,
    val3
INLINE [
    dt, val3
    40000, 33
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="model.png" style="width: 274px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33467iD78418725B89F172/image-size/large?v=v2&amp;amp;px=999" role="button" title="model.png" alt="model.png" /&gt;&lt;/span&gt;&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-center" image-alt="table.png" style="width: 560px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33468i664A81E762E71863/image-size/large?v=v2&amp;amp;px=999" role="button" title="table.png" alt="table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 17:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formatting-key-fields/m-p/1701226#M53687</guid>
      <dc:creator>mmarchese</dc:creator>
      <dc:date>2020-05-12T17:51:33Z</dc:date>
    </item>
  </channel>
</rss>

