<?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: Is it possible to Iterate Create Relationship Class? in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793154#M943</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/243248"&gt;Abraham&amp;nbsp; Downer&lt;/A&gt;‌, since a model can only have 1 iterator, your step 1 to create tables is its own model (or submodel). When you get to the relationship class step, the tables are already created. Instead of iterating again over the "Tables to Create" table, you could try iterating over the GDB that already has the tables in existence. Since the tables to be used for the relationship class end in "_Comp", then the destination table is %Name%_Comp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure how it will handle iterating over the "_comp" tables, since you only need the ones without comp at the inputs. Pro has a wildcard setting for the table iteration tool to limit which tables it iterates over. I don't have 10.3.1 so I'm not sure if those settings are there as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/441128_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Apr 2019 17:06:18 GMT</pubDate>
    <dc:creator>ColeAndrews</dc:creator>
    <dc:date>2019-04-03T17:06:18Z</dc:date>
    <item>
      <title>Is it possible to Iterate Create Relationship Class?</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793152#M941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a model that Iterates Field Values from one table containing a list of table names and another that contains a template schema to create a collection of tables for a vertical asset registry. The next step is that I need to add relationship classes. Each table has a naming convention of Water_FieldValue with a corresponding table of Water_FieldValue_Comp. Is it possible to use&amp;nbsp;the same tables and process&amp;nbsp;to iterate create relationship class?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcGIS 10.3.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2019 16:17:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793152#M941</guid>
      <dc:creator>AbrahamDowner1</dc:creator>
      <dc:date>2019-04-03T16:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to Iterate Create Relationship Class?</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793153#M942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is sort of what I have in mind.&amp;nbsp;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/441124_4.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2019 16:35:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793153#M942</guid>
      <dc:creator>AbrahamDowner1</dc:creator>
      <dc:date>2019-04-03T16:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to Iterate Create Relationship Class?</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793154#M943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/243248"&gt;Abraham&amp;nbsp; Downer&lt;/A&gt;‌, since a model can only have 1 iterator, your step 1 to create tables is its own model (or submodel). When you get to the relationship class step, the tables are already created. Instead of iterating again over the "Tables to Create" table, you could try iterating over the GDB that already has the tables in existence. Since the tables to be used for the relationship class end in "_Comp", then the destination table is %Name%_Comp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure how it will handle iterating over the "_comp" tables, since you only need the ones without comp at the inputs. Pro has a wildcard setting for the table iteration tool to limit which tables it iterates over. I don't have 10.3.1 so I'm not sure if those settings are there as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/441128_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2019 17:06:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793154#M943</guid>
      <dc:creator>ColeAndrews</dc:creator>
      <dc:date>2019-04-03T17:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to Iterate Create Relationship Class?</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793155#M944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Going to try and resurrect this thread after coming back to this project. I am now able to make my model work for the first and second level of my gdb asset hierarchy (buildings to rooms, and rooms to assets) because of the fact that the top level of each has one feature class (buildings) or one table (rooms). However when I try to iterate relationship classes for many assets tables with many component tables the model fails. I am utilizing a calculated value as an substituted inline variable to create the relationship class destination table from the original table (as well as the forward label). the python portion of the calculated value tool works, but for some reason the destination table portion of the create relationship class tool does not like that value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? ArcGIS version 10.6&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Failed to execute (Create Relationship Class).&lt;BR /&gt;Failed at Mon Apr 13 14:30:23 2020 (Elapsed Time: 0.39 seconds)&lt;BR /&gt;Executing (Iterate Tables): IterateTables "Some_directory\TEST_Water_Cityworks.gdb" *2* # NOT_RECURSIVE&lt;BR /&gt;Start Time: Mon Apr 13 14:30:23 2020&lt;BR /&gt;Succeeded at Mon Apr 13 14:30:24 2020 (Elapsed Time: 0.32 seconds)&lt;BR /&gt;Executing (Calculate Value): CalculateValue "WATER_2_Pumps"[:6]+"3"+"WATER_2_Pumps"[7:]+"_Comp" # Variant&lt;BR /&gt;Start Time: Mon Apr 13 14:30:24 2020&lt;BR /&gt;Value = WATER_3_Pumps_Comp&lt;BR /&gt;Succeeded at Mon Apr 13 14:30:24 2020 (Elapsed Time: 0.00 seconds)&lt;BR /&gt;Executing (Create Relationship Class): CreateRelationshipClass "Some_directory\TEST_Water_Cityworks.gdb\WATER_2_Pumps" WATER_3_Pumps_Comp "Some_directory\TEST_Water_Cityworks.gdb\WATER_2_Pumps_has_WATER_3_Pumps_Comp" SIMPLE WATER_3_Pumps_Comp WATER_2_Pumps BOTH ONE_TO_MANY NONE FacilityID ParentID # #&lt;BR /&gt;Start Time: Mon Apr 13 14:30:24 2020&lt;BR /&gt;ERROR 000622: Failed to execute (CreateRelationshipClass). Parameters are not valid.&lt;/P&gt;&lt;P&gt;ERROR 000732: Destination Table: Dataset WATER_3_Pumps_Comp does not exist or is not supported&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji jive-image image-4 j-img-original" src="https://community.esri.com/legacyfs/online/488406_relationship_model.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji jive-image image-3 j-img-original" src="https://community.esri.com/legacyfs/online/488405_gdb_structure.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/488404_error_message.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/488403_create_relationship_class_tool.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2020 19:44:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793155#M944</guid>
      <dc:creator>AbrahamDowner1</dc:creator>
      <dc:date>2020-04-13T19:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to Iterate Create Relationship Class?</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793156#M945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out. Had to&amp;nbsp;provide the directory for the destination table in the Calculate value tool. Also, had to switch backslashes to forward slashes for the python syntax to be correct. I used String as the data type in the tool. So,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"%Origin_Table%"[:6]+"3"+"%Origin_Table%"[7:]+"_Comp"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;needed to be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"Some_Directory/TEST_Water_Cityworks.gdb/"+"%Origin_Table%"[:6]+"3"+"%Origin_Table%"[7:]+"_Comp"&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2020 19:01:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793156#M945</guid>
      <dc:creator>AbrahamDowner1</dc:creator>
      <dc:date>2020-04-14T19:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to Iterate Create Relationship Class?</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793157#M946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I highly recommend using string formatting, a lot less painful&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"Some_Directory/Test_Water_Cityworks.gdb/{}3{}_Comp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"%Origin_Table%"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"%Origin_Table%"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;7&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2020 05:11:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/is-it-possible-to-iterate-create-relationship/m-p/793157#M946</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2020-04-16T05:11:12Z</dc:date>
    </item>
  </channel>
</rss>

