Robotic Process Automation (RPA)

Robotic Process Automation (RPA)

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  DataTable - CSV Load

    Posted Tue January 12, 2021 07:41 AM
    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 Wed January 13, 2021 05:28 PM
    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 Wed January 13, 2021 08:12 PM
    Hi Jenny this is great stuff exactly what I needed 

    Thanks
    Troy

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



  • 4.  RE: DataTable - CSV Load

    Posted 2 days ago

    Hi Jenny,

    That is fine if we get minimal columns from an excel and we should know what column names we're getting.

    but, what if there are more number of columns and the columns we're getting dynamically, we don't know what columns we're getting so we can't map. please help on this.

    I've trying to achieve this but no luck.



    ------------------------------
    raju vanga
    ------------------------------