<?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: Using V_String as Field type for Output RecordInfo in Custom Tool using Python SDK in Dev Space</title>
    <link>https://community.alteryx.com/t5/Dev-Space/Using-V-String-as-Field-type-for-Output-RecordInfo-in-Custom/m-p/721725#M1425</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/215155"&gt;@fardeen9983&lt;/a&gt;&amp;nbsp;, use Sdk.FieldType.v_string to add a V_String field.&amp;nbsp; You will need to specify the&amp;nbsp;&lt;EM&gt;max&lt;/EM&gt; number of characters that field can hold, which I tend to default to the max possible of&amp;nbsp;2147483647.&amp;nbsp; The actual size of the field will vary with the size of the data being stored.&amp;nbsp; The function call would look something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;self.rio.add_field("DownloadData", Sdk.FieldType.v_string, size=2147483647)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Feb 2021 13:28:13 GMT</pubDate>
    <dc:creator>tlarsen7572</dc:creator>
    <dc:date>2021-02-22T13:28:13Z</dc:date>
    <item>
      <title>Using V_String as Field type for Output RecordInfo in Custom Tool using Python SDK</title>
      <link>https://community.alteryx.com/t5/Dev-Space/Using-V-String-as-Field-type-for-Output-RecordInfo-in-Custom/m-p/721636#M1423</link>
      <description>&lt;P&gt;I am creating a custom download tool using the Python SDK. The output will include lengthy 30k+ lines of JSON string response. The documentation for the class &lt;A title="Documentation for Field Class" href="https://help.alteryx.com/developer/current/Python/use/FieldClass.htm?tocpath=SDKs%7CBuild%20Custom%20Tools%7CPython%20SDK%7CClasses%7CField%7C_____0" target="_blank" rel="noopener"&gt;Field&lt;/A&gt;&amp;nbsp;denotes "string" to be used for all possible string data types in Alteryx. But add_field or add_field_from_xml&amp;nbsp;method for &lt;A title="Documentation for RecordInfo" href="https://help.alteryx.com/developer/current/Python/use/RecordInfoClass.htm" target="_blank" rel="noopener"&gt;RecordInfo&lt;/A&gt; is also asking for a fixed size, in absence of which, the following error is thrown:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Code used&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;self.rio = Sdk.RecordInfo(1)

# using Add Field From XML
self.rio.add_field_from_xml("&amp;lt;Field name=\"DownloadHeders\" type=\"V_String\" &amp;gt;")
self.rio.add_field_from_xml("&amp;lt;Field name=\"DownloadData\" type=\"V_String\" &amp;gt;")

# Using Add Field
self.rio.add_field("DownloadHeaders", Sdk.FieldType.string)
self.rio.add_field("DownloadData", Sdk.FieldType.string)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Error Thrown&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Downloadheaders.png" style="width: 999px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/171375i52535748D83DEB64/image-size/large?v=v2&amp;amp;px=999" role="button" title="Downloadheaders.png" alt="Downloadheaders.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&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;In the scenario where I do specify the size and it exceeds the limit, following warning and error is thrown&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Browse.png" style="width: 556px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/171406iE3782EEF4BCEBCE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Browse.png" alt="Browse.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So my question is how do I use &lt;STRONG&gt;v_string&lt;/STRONG&gt; i n the python code without having to specify a fixed size for the field?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 11:25:47 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Dev-Space/Using-V-String-as-Field-type-for-Output-RecordInfo-in-Custom/m-p/721636#M1423</guid>
      <dc:creator>fardeen9983</dc:creator>
      <dc:date>2021-02-22T11:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using V_String as Field type for Output RecordInfo in Custom Tool using Python SDK</title>
      <link>https://community.alteryx.com/t5/Dev-Space/Using-V-String-as-Field-type-for-Output-RecordInfo-in-Custom/m-p/721725#M1425</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/215155"&gt;@fardeen9983&lt;/a&gt;&amp;nbsp;, use Sdk.FieldType.v_string to add a V_String field.&amp;nbsp; You will need to specify the&amp;nbsp;&lt;EM&gt;max&lt;/EM&gt; number of characters that field can hold, which I tend to default to the max possible of&amp;nbsp;2147483647.&amp;nbsp; The actual size of the field will vary with the size of the data being stored.&amp;nbsp; The function call would look something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;self.rio.add_field("DownloadData", Sdk.FieldType.v_string, size=2147483647)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 13:28:13 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Dev-Space/Using-V-String-as-Field-type-for-Output-RecordInfo-in-Custom/m-p/721725#M1425</guid>
      <dc:creator>tlarsen7572</dc:creator>
      <dc:date>2021-02-22T13:28:13Z</dc:date>
    </item>
  </channel>
</rss>

