Multiple assign: could not assign "cdbl(currentrow("mrc").toString)to number1

I have an input file as .CSV which I am reading under Read Text File so my flow is

  1. Read Text File (output variable is text1)
  2. Generate Data Table (DT1) and (under option I have clicked on Use First Row as Column Header)
  3. For Each Row in Data table (dt1)
  4. Multiple Assign
    number1=CDbl(CurrentRow(“MRC”).ToString)
    Firstcal=number1*number2

here number1, number2 and firstcal are Double and number2 has default value of 0.

getting error as "Multiple Assign: Could not assign “CDbl(CurrentRow(“MRC”).ToString)to number1”

AccountNo,Package,SrvCode,TaxType,M.txt (154 Bytes)

Can anyone assist

Hi @dipon1112000

Change the datatype of number1 from System.String to System.Double.

Regards

hi Thank you but number1 Variable type is System.Double

Hi @dipon1112000

Possible problems:

  • Check if your generate table activity is returning the correct datatable values(Like separating all the columns correctly)
  • Check that MRC is a valid header of your DT1 datatable
  • Validate that currentrow is a valid value to convert into double value

Regards

Hi @dipon1112000

Make the required changes in Generate Data Table From Text Wizard like below picture and run your process

Regards

Hi @dipon1112000

Please Check the Data Table as it coming with proper Header or NOT,
Otherwise your flow is correct.

Thanks :slight_smile:

If I am keeping the format as CSV

But I am getting error

If I am doing custom format then the header changes and I am getting errored

@dipon1112000

You are getting the digits in TaxType Column Not in MRC
In MRC you are getting String FCC. So FCC will not converting into Double

@dipon1112000

Remove Double Quote as it assuming one Column Value

Remove and try the same flow you have, It gonna work absolutely fine. :slight_smile:

Cheers!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.