Hi,
I have a set of 8 client related tables which includes a Master Client file that contains key fields like Branch, Adviser that needs to be added to each of the remaining Datatables. I have a process that uses the Client ID to locate the current record and then update data fields. Each of the related tables have the same fields to update and I was aiming to create a For Each process which would replace the Datatable name based on a String variable as follows:
- Load all Client Datatables
- Load Datable containing a list of the Datatables created in Step 1.
- For Each row in Datatable (using list in Step 2).
- Get Datable name as String from Step 3.
- Use that string variable as the Datatable name to do the updates of data.
The process works fine when I am specifiying the actual Datatable name, but I would need to replicate the same process multiple times replacing the Datatable name. I wanted to create 1 loop that would cycle through the list of Datatables and just replace throughout the process.
When I use the string variable as the Datatable name it doesn’t like it as says "Value of type ‘String’ cannot be converted to ‘DataTable’.
Is there a way that I can pass a string variable and it will find that as the datatable name?
Thanks