ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

How is XML in tables supposed to work?

Joshman108
7 - Meteor

I open a new workflow. 

I insert a table tool.

I click on XML tab.

I edit xml.

I paste the following xml snippet.

I click off and click back onto the xml pane.

The xml has now changed in two notable ways:

    1)  <TableFields orderChanged="True"> has become <TableFields orderChanged="False">

    2) All <SimpleVar>Col2 Flag</SimpleVar> have become <SimpleVar />

 

Although this is an example, this is REAL behavior I am experiencing in a workflow. The XML will change in the above ways SEEMINGLY AT RANDOM for random tables at random times. Running the workflow does not correct it. <SimpleVar /> will remain <SimpleVar /> and literally prevent my tables form working correctly and workflow from finishing. 

 

I cannot share my main workflow or data due to security, but I am at least able to recreate the core of the issue as described here. Due to the seemingly RANDOM timing of the XML going bonk in my proper workflow, I have wasted considerable time on this thinking I am fixing issues but going in circles.

 

Why is it doing this?

Can anyone reproduce my example??

 

 

 

<Configuration>
  <TableMode>Basic</TableMode>
  <GroupingFields orderChanged="False" />
  <Width>100%</Width>
  <ShowHeader value="True" />
  <ShowBarGraph value="False" />
  <TableFields orderChanged="True">
    <Field name="Col0" selected="True" Alignment="Left" Borders="Left" Width="" />
    <Field name="Col1" selected="True" Alignment="Left" Width="" Borders="Right" />
    <Field name="Col2" selected="True" Alignment="Right" Borders="Left" Width="" Places="0" />
    <Field name="Avg Col2" selected="True" Alignment="Right" Alias="Average Col2" Width="" Places="0" Borders="Right" />
  </TableFields>
  <TableStyles>
    <Style Name="Data" Font="Arial" Size="8" TextColor="#000000" BackColor="#ffffff" AltColor="#f0f0f0" RowGroup="1" />
    <Style Name="Header" Font="Arial" Size="10" TextColor="#000000" BackColor="#dbdbdb" />
    <Style Name="Borders" Width="3" DataColor="#000000" HeaderColor="#000000" RowBorder="None" BasicColBorder="Default (Use Per Column Setting)" />
    <Style Name="Table" CellPadding="0" ColumnPadding="0" TableBorder="true" Width="2" BorderColor="#000000" />
  </TableStyles>
  <StyleRules>
    <Rule Name="e3436a35-8897-40ad-bba0-ce554d91a997">
      <RowRule value="False" />
      <HighPrecedence value="False" />
      <Field>Col2</Field>
      <Test>Simple</Test>
      <ApplyTo>Data</ApplyTo>
      <SimpleVar>Col2 Flag</SimpleVar>
      <SimpleOp>==</SimpleOp>
      <SimpleConst>Red</SimpleConst>
      <Formula>1</Formula>
      <Style BackColor="#ff0000" />
      <PrettyName>Red Flag</PrettyName>
    </Rule>
    <Rule Name="d3cc27e0-2235-41a7-babe-d0a5aa5f9111">
      <RowRule value="False" />
      <HighPrecedence value="False" />
      <Field>Col2</Field>
      <Test>Simple</Test>
      <ApplyTo>Data</ApplyTo>
      <SimpleVar>Col2 Flag</SimpleVar>
      <SimpleOp>==</SimpleOp>
      <SimpleConst>Orange</SimpleConst>
      <Formula>1</Formula>
      <Style BackColor="#ff8000" />
      <PrettyName>Orange Flag</PrettyName>
    </Rule>
    <Rule Name="1f930df9-cf63-456d-b8cb-69b542832906">
      <RowRule value="False" />
      <HighPrecedence value="False" />
      <Field>Col2</Field>
      <Test>Simple</Test>
      <ApplyTo>Data</ApplyTo>
      <SimpleVar>Col2 Flag</SimpleVar>
      <SimpleOp>==</SimpleOp>
      <SimpleConst>Yellow</SimpleConst>
      <Formula>1</Formula>
      <Style BackColor="#ffff00" />
      <PrettyName>Yellow Flag</PrettyName>
    </Rule>
    <Rule Name="821efedd-0371-402c-8eb1-01bdc5e1008d">
      <RowRule value="False" />
      <HighPrecedence value="False" />
      <Field>Col2</Field>
      <Test>Simple</Test>
      <ApplyTo>Data</ApplyTo>
      <SimpleVar>Col2 Flag</SimpleVar>
      <SimpleOp>==</SimpleOp>
      <SimpleConst>Green</SimpleConst>
      <Formula>1</Formula>
      <Style BackColor="#00ff00" />
      <PrettyName>Green Flag</PrettyName>
    </Rule>
    <Rule Name="ad0cd3be-ac95-4900-91b6-6e9421d08925">
      <RowRule value="False" />
      <HighPrecedence value="False" />
      <Field>Col2</Field>
      <Test>Simple</Test>
      <ApplyTo>Data</ApplyTo>
      <SimpleVar>Col2 Flag</SimpleVar>
      <SimpleOp>==</SimpleOp>
      <SimpleConst>Blue</SimpleConst>
      <Formula>1</Formula>
      <Style BackColor="#0099d8" />
      <PrettyName>Blue Flag</PrettyName>
    </Rule>
  </StyleRules>
</Configuration>

 

ImadZidan
12 - Quasar

Hello @Joshman108 ,

 

I have looked and below are my observation:

 

The below rule on Col2 are not correct in terms of options chosen.

Please explain what you are trying to do here? where Col2 Flag is coming from as it does not exist as a field.

 

With the regards to the chnagedorder setting, it is set to true when you actually change the order of the field. but the initial setting is false. 

 

Please let us know .

 

    <Rule Name="e3436a35-8897-40ad-bba0-ce554d91a997">
      <RowRule value="False" />
      <HighPrecedence value="False" />
      <Field>Col2</Field>
      <Test>Simple</Test>
      <ApplyTo>Data</ApplyTo>
      <SimpleVar>Col2 Flag</SimpleVar>
      <SimpleOp>==</SimpleOp>
      <SimpleConst>Red</SimpleConst>
      <Formula>1</Formula>
      <Style BackColor="#ff0000" />
      <PrettyName>Red Flag</PrettyName>
    </Rule>
    <Rule Name="d3cc27e0-2235-41a7-babe-d0a5aa5f9111">
      <RowRule value="False" />
      <HighPrecedence value="False" />
      <Field>Col2</Field>
      <Test>Simple</Test>
      <ApplyTo>Data</ApplyTo>
      <SimpleVar>Col2 Flag</SimpleVar>
      <SimpleOp>==</SimpleOp>
      <SimpleConst>Orange</SimpleConst>
      <Formula>1</Formula>
      <Style BackColor="#ff8000" />
      <PrettyName>Orange Flag</PrettyName>
    </Rule>
    <Rule Name="1f930df9-cf63-456d-b8cb-69b542832906">
      <RowRule value="False" />
      <HighPrecedence value="False" />
      <Field>Col2</Field>
      <Test>Simple</Test>
      <ApplyTo>Data</ApplyTo>
      <SimpleVar>Col2 Flag</SimpleVar>
      <SimpleOp>==</SimpleOp>
      <SimpleConst>Yellow</SimpleConst>
      <Formula>1</Formula>
      <Style BackColor="#ffff00" />
      <PrettyName>Yellow Flag</PrettyName>
    </Rule>
    <Rule Name="821efedd-0371-402c-8eb1-01bdc5e1008d">
      <RowRule value="False" />
      <HighPrecedence value="False" />
      <Field>Col2</Field>
      <Test>Simple</Test>
      <ApplyTo>Data</ApplyTo>
      <SimpleVar>Col2 Flag</SimpleVar>
      <SimpleOp>==</SimpleOp>
      <SimpleConst>Green</SimpleConst>
      <Formula>1</Formula>
      <Style BackColor="#00ff00" />
      <PrettyName>Green Flag</PrettyName>
    </Rule>
    <Rule Name="ad0cd3be-ac95-4900-91b6-6e9421d08925">
      <RowRule value="False" />
      <HighPrecedence value="False" />
      <Field>Col2</Field>
      <Test>Simple</Test>
      <ApplyTo>Data</ApplyTo>
      <SimpleVar>Col2 Flag</SimpleVar>
      <SimpleOp>==</SimpleOp>
      <SimpleConst>Blue</SimpleConst>
      <Formula>1</Formula>
      <Style BackColor="#0099d8" />
      <PrettyName>Blue Flag</PrettyName>
    </Rule>

 

danilang
17 - Castor
17 - Castor

Hi @Joshman108 

 

As @ImadZidan mentioned, your initial XML is invalid.  In your column rules, you reference [Col2 Flag] In <SimpleVar>, but it doesn't exist as a <Field> in <Table Fields>.  If the column doesn't exist in the input, the tool throws an error.  If it does, then xml is rebuilt to add this field along with *Unknown as soon as you leave the xml window. 

 

For  <TableFields orderChanged="True">, while you can override the setting in the xml, it actually seems to be recalculated when the standard UI config window is reentered, based on comparing the order input fields to the order of the output fields.  For the tests I've done with the attached workflow, if the output order doesn't match the input order the flag is set to true, otherwise it's false.

 

I wasn't able able to reproduce the case where the <SimpleVar>...</SimpleVar> is reset to <SimpleVar/>.  Play around with the attached generic workflow and see if you can reproduce the exact steps that lead to this.   If you can, post the results back here. 

 

You can also use the attached to submit a case to support@alteryx.com.  If you decide to go this route, make sure that you have a detailed list of steps to reproduce the issue     

 

Dan  

Joshman108
7 - Meteor

Thanks for your input @danilang 

 

You're right that I was missing the [Col2 Flag] in my table fields, but my issue (where the table tool changes the configuration) remained (testable via attached workflow and actions described below). 

 

After more testing I realize my issue stems from the interaction between these items:

1) The python tool (present in my workflow) failing to send metadata 

2) The table tool removing any selected="False"-like columns from the Table tool under certain circumstances.

 

For the following scenarios, assume the workflow 1) has a table tool which has been configured as desired 2) a python tool upstream from the table and 3) workflow has been run successfully with python tool not yet yielding the "no metadata to outgoing connection" message.

 

From this point, here here the actions I can take which will ruin the table configuration (by removing all selected="False" columns) :

 

1) Table does not have "dynamic or unknown fields" selected. I click around the UI such that the python tool yields "no metadata to outgoing connection" message. I then click on the python tool. I then click back on the table. BANG. Configuration destroyed. No issue here if "dynamic or unknown fields" IS selected. And no issue when clicking on any other tool (that I've tested).

2) I click around the UI such that the python tool yields "no metadata to outgoing connection" message. I then add a new tool between python and table. I then click back on the table. BANG. Configuration destroyed. Does not matter whether or not  "dynamic or unknown fields" is selected.

3) Table does have "dynamic or unknown fields" selected. I save workflow before getting any warning/message concerning the python metadata. I re-open the workflow. BANG! Configuration destroyed. True for saving to gallery and desktop. 

 

I wish I could fix the python issue natively but I may just have to get rid of it for simplicity.

 

patrick_digan
16 - Nebula
16 - Nebula

FYI I've submitted an idea to correct this issue. Generally speaking, there are a number of tools which can lose their configurations whenever the metadata is interrupted.

Labels