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.
Attribute | Value |
ID | AB |
OID | 10 |
NUMBER | ABC1234 |
FACTOR | 100 |
SHARECODE | A |
TIMESTAMP | 2021-04-28-15.36.59.843000 |
ID | CD |
NUMBER | ABC1234 |
TICODE | A |
FORM | K |
C_DESCRIPTION_1 | PORT |
C_DESCRIPTION_2 | STARBOARD |
C_DESCRIPTION_3 | TEST DESCRIPTION |
STATUS_CODE | 123 |
STOCK | 1 |
PARTNER_NAME | ABC |
ID | EF |
LINE_CODE | 1AB |
SOURCE_CODE | T |
LINE_CODE | 2CA |
SOURCE_CODE | S |
ID | GH |
PLANT | 11 |
LINE_CODE | ---- |
PLANT | 12 |
LINE_CODE | ---- |
ID | IJ |
MARKET | ABC |
MARKET | DEF |
MARKET | GHI |
ID | KL |
VERSION | 1 |
LANGUAGE | EN |
TYPE | MA |
REMARKS | TEST REMARKS |
VERSION | 1 |
LANGUAGE | EN |
TYPE | PR |
PROBLEM | TEST PROBLEM |
VERSION | 1 |
LANGUAGE | EN |
TYPE | UR |
SOLUTION | TEST SOLUTION |
ID | MN |
VERSION | 1 |
ID | OP |
PART_NUMBER | 12345678 |
PART_NAME | NUT |
ACTION | A |
TYPE | N |
ID | QR |
LINE_CODE | 2CA |
QUANTITY | 2,000 |
RELEASE | Y |
ID | ST |
LIST | +0Z0 |
LIST | +4H5 |
LIST | +4K5 |
PART_NUMBER | 12345678A |
PART_NAME | BOLT |
ACTION | R |
TYPE | N |
ID | QR |
LINE_CODE | 1AB |
QUANTITY | 1,000 |
RELEASE | Y |
ID | ST |
LIST | +4K5 |
LIST | /4K6 |
LIST | +5F1 |
LINE_CODE | 1AB |
QUANTITY | 3,000 |
RELEASE | N |
ID | ST |
LIST | +4K5 |
LIST | /4K6 |
LIST | +5F1 |
ID | UV |
ID | WX |
NUMBER | ABC1234 |
FILE_VERSION | 3 |
FILE_NAME | ABC1234.pdf |
FILE_TIMESTAMP | 2021-04-16T10:33:16.369000 |
value | TEST |
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.
Attribute | Value |
ID | AB |
OID | 10 |
NUMBER | ABC1234 |
FACTOR | 100 |
SHARECODE | A |
TIMESTAMP | 2021-04-28-15.36.59.843000 |
Attribute | Value |
ID | CD |
NUMBER | ABC1234 |
TICODE | A |
FORM | K |
C_DESCRIPTION_1 | PORT |
C_DESCRIPTION_2 | STARBOARD |
C_DESCRIPTION_3 | TEST DESCRIPTION |
STATUS_CODE | 123 |
STOCK | 1 |
PARTNER_NAME | ABC |
Attribute | Value |
ID | EF |
LINE_CODE | 1AB |
SOURCE_CODE | T |
LINE_CODE | 2CA |
SOURCE_CODE | S |
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
Solved! Go to Solution.
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.
@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.
ID | OP |
PART_NUMBER | 12345678 |
PART_NAME | NUT |
ACTION | A |
TYPE | N |
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.
ID | ST |
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.
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.
@ssripat3 attaching the updated workflow, to split the TABLE_ID=ST I needed to redesign the workflow
@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