Zum Hauptinhalt gehen

How do I clear a DataTable in a Workflow?

Kommentare

4 Kommentare

  • Permanently deleted user
    I believe you can do this with the 'Invoke Method' workflow activity.  Set the targetObject to your datatable and set the methodName to 'Clear' (case sensitive).  
    0
  • Sean McClurkan
    Thanks!  The old InvokeMethod.  So that's what that's for.  Is there a way to get the current zero-based index for a DataRow?  I need that for another issue I'm wrangling with.
    0
  • Permanently deleted user
    Again untested, but I think you could do something like yourDatatable.Rows.IndexOf(theDataRowYouAreLookingFor) which returns an integer.  

     

    Most of the time I am looping through the datatable or array of found datarows so I just throw an incrementer in the loop to get the index I'm looking for.
    0
  • Sean McClurkan
    Of course, an incremented counter.  DOH!

     

    Thanks again for the quick response.
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.