Confusion on the last part Calculate Client Security assignment 2

I have gotten to this part:

Create a blank sequence workflow in the System1 folder, to extract a Data Table variable that holds all the Work Items in the System1 application. We’ll extract all the available work items and filter the WI5 type later.

I need help understanding data tables in general, how to manipulate the data table without using an excel spreadsheet, how to add the transaction indexes, and setting the TransctionID to the value of the Work Item ID.

I went back and reviewed the Excel and Data tables, but it focuses mostly on Excel and I’m not sure if any of that is applicable when using data scrapping.

I’m at a loss here. Please assist.

I’m uploading the section that I am having difficulty with. I dont need the answer, I just need some knowledge. GetTransactionData.xaml (7.2 KB)

If you do a search for DataTable in your Activities pane you should get a list of all the activities that are available specifically for the DataTable object.

The most common two that I use are the For Each Row activity that will iterate through the DataTable and I can manipulate or access each row object however I like. The other is the Filter Data Table which I use when I only want certain rows of the Data Table but not other.

I hope this helps to know where the activities are located. Definitely play around with them an experiment a bit.

1 Like

Thanks for the response. I went back and watched the videos and practices for those activities. I think I understand it a bit better. I made the following updates

Extract Data Sequence:

  • Data is scrapped from the website: DT1 (Data table)
    • DT1 passes the info to out_DataTablea
  • Data is written into an Excel file: WIList (.xlsx)

Init Sequence::

  • grabs the out_DataTablea info and passes it to dt_WIs (data table)
  • WIList (Array of data rows variable) is assigned the selection of dt_WIs.Select (type and open columns)
  • WIList default value is set to out_WILista (Array of data rows argument)
  • index is assigned using a For each Row
    • For each row in dt_WIs
    • TransactionNumber = dt_WIs.Rows.IndexOf(row) + 1
      -TransactionNumber (INT32 variable) = 1

Get Transaction Data Sequence:

  • out_WILista is the value of in_WIList (Array of data rows argument) so the rows get passed into the Get transaction Data Sequence
    in_TransactionNumber (INT32 variable) has a value of TransactionNumber
  • created an if condition:
    in_TransactionNumber <= in_WIList.Count
    Then out_TransactionItem=in_WIList(in_TransactionNumber)
    Else out_TransactionItem=Nothing
  • Used an Assign activity out_TransactionID = out_TransactionItem(“WIID”).ToString

When I run it, I’m getting the following error:

  1. For the WIList = dt_WIs.Select(“Type=‘W15’ AND Status =‘Open’”) assign activity it says
    Object reference not set to an instance of an object.
  2. For the TransactionNumber.Rows.IndexOf(row) +1 For Each Row activity it says:
    Object reference not set to an instance of an object.
  3. For the If condition in GetTransactionData: in_TransactionNumber<=in_WIList.Count, it says:
    Value cannot be null
  4. For the out_TransactionID = out_TransactionItem(“WIID”).ToString activity, it says:
    Object reference not set to an instance of an object.

My initial thoughts are that

  1. Maybe my information is not passing through the variables and arguements correctly.
  2. Maybe the activities are not nested correctly.
  3. Maybe my variable types and argument types are not correct.

Any thoughts would be appreciated!

1 Like

Really you should be using the Filter Data Table activity rather than a select. The output will give you a DataTable with just the objects you matching what you specify in the step, and that way you don’t have to try and iterate over an array.

Also, the for each row activity should give you a row variable that you can just look at the values of because the activity goes through the table for you and assigns each row to that variable in turn. There shouldn’t be a need to check the index of it, just the values of it.

I hope those two pieces help to make sense of things

2 Likes