<?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 Max length of all fields in the Dashboard in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721297#M451830</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a requirement to display the list of all the field names and its maximum value length.&lt;/P&gt;&lt;P&gt;I have tried max(len($Field)) in front end which gives me length of the field name not the value.&lt;/P&gt;&lt;P&gt;I have tried loops in script tried max(len(FieldName(Field,Table)) , again it gave length of the field name not the value..&lt;/P&gt;&lt;P&gt;Please suggest a solution.. Front end or in script any thing is fine&lt;/P&gt;&lt;P&gt;My desired o/p is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table NAme&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field Name&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Maxlength&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;121&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;34&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jun 2020 13:55:18 GMT</pubDate>
    <dc:creator>raajaswin</dc:creator>
    <dc:date>2020-06-23T13:55:18Z</dc:date>
    <item>
      <title>Max length of all fields in the Dashboard</title>
      <link>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721297#M451830</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a requirement to display the list of all the field names and its maximum value length.&lt;/P&gt;&lt;P&gt;I have tried max(len($Field)) in front end which gives me length of the field name not the value.&lt;/P&gt;&lt;P&gt;I have tried loops in script tried max(len(FieldName(Field,Table)) , again it gave length of the field name not the value..&lt;/P&gt;&lt;P&gt;Please suggest a solution.. Front end or in script any thing is fine&lt;/P&gt;&lt;P&gt;My desired o/p is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table NAme&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field Name&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Maxlength&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;121&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;34&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Table3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Field1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 13:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721297#M451830</guid>
      <dc:creator>raajaswin</dc:creator>
      <dc:date>2020-06-23T13:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Max length of all fields in the Dashboard</title>
      <link>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721304#M451832</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Find the Max length of the fields in each table while load itself and sort by Descending order.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do the Resident load where rowno=1 and concatenate as single table and present in the dashboard.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Yogesh.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 14:07:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721304#M451832</guid>
      <dc:creator>yogi_myd</dc:creator>
      <dc:date>2020-06-23T14:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Max length of all fields in the Dashboard</title>
      <link>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721338#M451837</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;one solution on load Script :&lt;/P&gt;&lt;P&gt;Suppose I have those Tables :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Taoufiq_ZARRA_0-1592924675095.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36103i2A617302B51E7725/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Taoufiq_ZARRA_0-1592924675095.png" alt="Taoufiq_ZARRA_0-1592924675095.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Script :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Table1:
load * inline [
A,B,C
1,2564,56464 dfgs
10,25,56464 dfgssd
];


Table2:
load * inline [
AA,BB,CC
1sdfd,25sdfs64,56fdsfds464 dfgs
1fsdf,2ff5,56dfsdffsdfsdfd464 dfgssd
];


FOR i = NoOfTables()-1 to 0 STEP -1

  LET vTable=TableName($(i));
  
  
  FOR j =1 to  NoOfFields('$(vTable)')
 
FieldMax:
  let vFieldName=FieldName($(j),'$(vTable)') ;
 //let vfakue=Peek($(vname),'$(vTable)');

   
   LOAD 
   
     len($(vFieldName)) as lengthfield,
   '$(vTable)' as [Table Name],
   '$(vFieldName)' as [Field Name]
   
    RESIDENT [$(vTable)];
  
  NEXT j
   

NEXT i


outputFieldMax:
noconcatenate
load [Table Name],[Field Name], max(lengthfield) as Maxlength resident FieldMax group by [Table Name],[Field Name] ;

drop table FieldMax;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Taoufiq_ZARRA_1-1592924731702.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36104iEEF0C78EE8DD7EDE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Taoufiq_ZARRA_1-1592924731702.png" alt="Taoufiq_ZARRA_1-1592924731702.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 15:05:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721338#M451837</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-23T15:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Max length of all fields in the Dashboard</title>
      <link>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721559#M451847</link>
      <description>&lt;P&gt;Yes This is working. Thanks..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it loads all the columns again.. like if there are 200 columns in the dashboard. It loads all the columns again.. I am using this solution as of now. But please let me know if something can be done in a optimized way either in front end or scripting&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 06:05:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721559#M451847</guid>
      <dc:creator>raajaswin</dc:creator>
      <dc:date>2020-06-24T06:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Max length of all fields in the Dashboard</title>
      <link>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721618#M451849</link>
      <description>&lt;P&gt;yes!&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Table1:
load * inline [
A,B,C
1,2564,56464 dfgs
10,25,56464 dfgssd
];


Table2:
load * inline [
AA,BB,CC
1sdfd,25sdfs64,56fdsfds464 dfgs
1fsdf,2ff5,56dfsdffsdfsdfd464 dfgssd
];


FOR i = NoOfTables()-1 to 0 STEP -1

  LET vTable=TableName($(i));
  
  
  FOR j =1 to  NoOfFields('$(vTable)')
 
FieldMax:
  let vFieldName=FieldName($(j),'$(vTable)') ;
 //let vfakue=Peek($(vname),'$(vTable)');

   
   LOAD 
   
     Max(len($(vFieldName))) as lengthfield,
   '$(vTable)' as [Table Name],
   '$(vFieldName)' as [Field Name]
   
    RESIDENT [$(vTable)];
  
  NEXT j
   

NEXT i&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Jun 2020 08:47:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721618#M451849</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-24T08:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Max length of all fields in the Dashboard</title>
      <link>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721622#M451850</link>
      <description>&lt;P&gt;A UI solution would be a tricky one but possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$(=concat('if($Field=' &amp;amp; chr(39) &amp;amp; $Field &amp;amp; chr(39) &amp;amp; ',Max({1}Len([' &amp;amp; $Field &amp;amp; ']))', ',') &amp;amp; concat(right($Field&amp;amp;')',1)))&lt;/LI-CODE&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="tresesco_0-1592989487557.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36158iA311447B2665BA9C/image-size/large?v=v2&amp;amp;px=999" role="button" title="tresesco_0-1592989487557.png" alt="tresesco_0-1592989487557.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Credit goes to&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6446"&gt;@rbecher&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 09:08:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-length-of-all-fields-in-the-Dashboard/m-p/1721622#M451850</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-06-24T09:08:56Z</dc:date>
    </item>
  </channel>
</rss>

