I am working on eventually comparing the two datables below, I would like the format
To look the same as the one below:
I would like the tables to both have Form ID, Form Edition and Form Title as the columns with the same formatting as the second.
Eventually I will be using these to compare for values that are matching and values that are not matching. The not matching values will then be outputted into a new table for use later to enter into a website.
Try datatable activites like remove data columns. Then use string functions to remove spaces in bad formedition then use string function for formatting the new value as badFormEdition.tostring(ā(00/00)ā)
@ajeffers I would create a brand new datatable that is a clone of the datatable you want in the end. Iāll assume your first picture is dt1, your second pic is dt2 (this is the one you like the schema/structure), and youāll create a new table called dt3 which is just going to be the same info as dt1, but with the schema of dt2.
Assign dt3 = dt2.clone // this copies the layout of dt2 to be used for the new datatable
For each row in dt1
2a. Assign FormID = row.item("FormPrefix").ToString + " " + row.item("FormNumber").ToString
2b. Assign FormEdition = "(" + row.item("FormEdition").ToString.replace(" ","/") + ")"
2c. Assign FormTitle = row.item("FormTitle").ToString
2d. Add data row activity with the following properties: ArrayRow = {FormId,FormEdition,FormTitle} // Datarow = (leave this blank) // DataTable = dt3
Now you have 2 datatables (dt2 & dt3) in the same format
I utilized this and it seems to be workout, I also inserted output table after and logged it out to a string. Is there a way I can output this into a another datatable variable? Iām using it in a subworkflow and I want to throw it be able to move it out of the workflow itās currently sitting in, in tact with the new format.
@ajeffers, instead of having it be a variable named dt3, change it to an argument called dt3 (or whatever you want to name it). Make sure the direction for the argument is set to out.
Then when you invoke the workflow you can click the āimport argumentsā button and it will pop-up the box to set the arguments from this workflow to variables/arguments in the workflow that invoked it