Alteryx Designer Desktop Discussions

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

Split table into multiple tables when Attribute is "ID"

ssripat3
8 - Asteroid

Hello Alteryx community, I have an XML file which I used the XML Parse Macro on to get all the values in a tabular format and create a PDF from that table. Below is how the current table/PDF appears.

 

AttributeValue
IDAB
OID10
NUMBERABC1234
FACTOR100
SHARECODEA
TIMESTAMP2021-04-28-15.36.59.843000
IDCD
NUMBERABC1234
TICODEA
FORMK
C_DESCRIPTION_1PORT
C_DESCRIPTION_2STARBOARD
C_DESCRIPTION_3TEST DESCRIPTION
STATUS_CODE123
STOCK1
PARTNER_NAMEABC
IDEF
LINE_CODE1AB
SOURCE_CODET
LINE_CODE2CA
SOURCE_CODES
IDGH
PLANT11
LINE_CODE----
PLANT12
LINE_CODE----
IDIJ
MARKETABC
MARKETDEF
MARKETGHI
IDKL
VERSION1
LANGUAGEEN
TYPEMA
REMARKSTEST REMARKS
VERSION1
LANGUAGEEN
TYPEPR
PROBLEMTEST PROBLEM
VERSION1
LANGUAGEEN
TYPEUR
SOLUTIONTEST SOLUTION
IDMN
VERSION1
IDOP
PART_NUMBER12345678
PART_NAMENUT
ACTIONA
TYPEN
IDQR
LINE_CODE2CA
QUANTITY2,000
RELEASEY
IDST
LIST+0Z0
LIST+4H5
LIST+4K5
PART_NUMBER12345678A
PART_NAMEBOLT
ACTIONR
TYPEN
IDQR
LINE_CODE1AB
QUANTITY1,000
RELEASEY
IDST
LIST+4K5
LIST/4K6
LIST+5F1
LINE_CODE1AB
QUANTITY3,000
RELEASEN
IDST
LIST+4K5
LIST/4K6
LIST+5F1
IDUV
IDWX
NUMBERABC1234
FILE_VERSION3
FILE_NAMEABC1234.pdf
FILE_TIMESTAMP2021-04-16T10:33:16.369000
valueTEST

 

I would like to use Alteryx to split the above table into individual tables when Attribute is equal to "ID" and again add them probably using a "Layout" module according to a user defined format for the PDF.  I am attaching the workflow I am using right now as a reference.

 

The thing here is, I will have to run this through different files which might have more data than the sample I have given. I looked into the community and most of them are suggesting the use of a Batch Macro, but I feel my data wouldn't be as complex as that.

 

Below is an example of how I would like my data to be split.

 

AttributeValue
IDAB
OID10
NUMBERABC1234
FACTOR100
SHARECODEA
TIMESTAMP2021-04-28-15.36.59.843000

 

 

AttributeValue
IDCD
NUMBERABC1234
TICODEA
FORMK
C_DESCRIPTION_1PORT
C_DESCRIPTION_2STARBOARD
C_DESCRIPTION_3TEST DESCRIPTION
STATUS_CODE123
STOCK1
PARTNER_NAMEABC

 

AttributeValue
IDEF
LINE_CODE1AB
SOURCE_CODET
LINE_CODE2CA
SOURCE_CODES

 

I would like to split the data similar to above until we reach the end of the table. Can someone give me ideas on how we could achieve that?

 

My end objective is to add all this tables again into a Layout and generate a PDF using Render.

 

Thank you

7 REPLIES 7
binuacs
20 - Arcturus

@ssripat3 one way of doing this

 

binuacs_0-1653674129239.png

 

ssripat3
8 - Asteroid

Sorry for the delayed reply. This works perfectly for splitting the data into multiple tables based on the ID.

 

I have another query, I am trying to arrange these tables individually into a PDF in a user-defined layout or format.

 

I am adding a sample of the layout down below, could you possibly give me some ideas on how to achieve it?

 

The objective here is to put the the data from below ID="OP" because these values keep on repeating and will need to be laid beside the respective PART NO.

 

Please let me know if you have any questions. 

 

 

ssripat3
8 - Asteroid

@binuacs. One other question.

 

In the above data after ID="OP". PART NUMBER gets repeated and the second Part Number isn't segregated by ID.

 

I would like to know if I could split the above table in the below manner.

 

IDOP
PART_NUMBER12345678
PART_NAMENUT
ACTIONA
TYPEN

 

The above would be the first part number and the related data for this part number ends with values in TABLE ID = "ST" which would be below.

 

IDST
LIST+0Z0
LIST+4H5
LIST+4K5

 

Next, we have another PART NUMBER 12345678A. This will have another set of details that are relevant to this part. In the existing logic, we are dividing it based on ID and that is what I need. But only for this specific scenario, I need to split whenever we have PART_NUMBER in Table ID "OP" after "ST".

 

Below is the current table.

 

Alteryx-Sample-New Table.jpg

binuacs
20 - Arcturus

@ssripat3 you want to split only the below part into two 

 

binuacs_0-1654015346369.png

 

ssripat3
8 - Asteroid

Kind of yes, But I want to split the complete data along with the image shared. 

 

But in the image, I should be a separate table record and II should be another table record.

 

In other words, when TABLE ID ="ST". After that if NODE=ROW and Attribute = "PART NUMBER". Then we have to add it into a new table.

binuacs
20 - Arcturus

@ssripat3 attaching the updated workflow, to split the TABLE_ID=ST I needed to redesign the workflow 

 

binuacs_0-1654032056176.png

 

binuacs
20 - Arcturus

@ssripat3 you can adjust the table width to automatic, percentage or fixed according to your requirement. The table is not flexible as excel . Please let me know if you need any additional information

 

binuacs_1-1654032490588.png

 

Labels