Robotic Process Automation

Expand all | Collapse all

DataTable - CSV Load

  • 1.  DataTable - CSV Load

    Posted 6 days ago
    Hi there

    I am writing a bot that consumes a CSV file and I have the data into a DataTable. Its all there and it looks great.

    I am trying to figure out how to loop over that DataTable as for each row I need to update columns that are empty. I have looked through the DataTable package and the Control package but do not really see a way to do this. 

    I assume that I have to use a for or a for each just wondering if there a proper pattern for this?

    Thanks

    ------------------------------
    Troy DesBarres
    ------------------------------


  • 2.  RE: DataTable - CSV Load

    Posted 4 days ago
    Dear Troy,

    You are right, for this we will need to loop through the DataTable with either For or For Each loop.

    What I usually do:
    1. use a For loop with an iterator variable to loop through the DataTable 
    2. use Map Table Row to map the column to corresponding variables
    3. to check if a variable is empty/null value, you can consider the Empty or Null Text Variable command

    I have some screenshots below for reference.

    ------------------------------
    JENNY KHUC
    ------------------------------



  • 3.  RE: DataTable - CSV Load

    Posted 4 days ago
    Hi Jenny this is great stuff exactly what I needed 

    Thanks
    Troy

    ------------------------------
    Troy DesBarres
    ------------------------------