"Assign" keeps showing the name doesn't exist

I want to convert Total(data table) to NumbersS(String variable) & HospitalS(String variable) to process the following sequence ( replace text in Word document using variable. There are two words I need to replace and to create 160 different files.)
But the system keeps showing the name doesn’t exist. How can I select the first and second columns separately and assign them to two different variables?

The “Total” Table is like below:
Numbers Hospitals
20230401 A
20230402 B
20230403 C
(160 rows)

Thank you for your help!

You can try using index instead of name.

NumberS = CurrentRow(0).Tostring
HospitalS = CurrentRow(1).Tostring

2 Likes

Thank you for your quick reply!
But the system shows this notification.
image

Hi,

Can you try as the following?

CurrentRow["Numbers"].ToString()

Regards,

Sure! It shows this
image

In the first image CurrentRow is spelt wrong (In assign activity)

test

How about the following?

Int32.Parse(CurrentRow["Numbers"].ToString())

Regards

Many thanks for your notification. But after using
NumberS = CurrentRow(0).Tostring
HospitalS = CurrentRow(1).Tostring
I still cannot run it. Can you give me another suggestions? Thank you.

Here is another error
image

Change NumberS variable to Int type.

Did you input previous as the following?

 CurrentRow["Numbers"].ToString()

The error shows CurrentIndex

Can you retry it?

Can you share the image of properties of for each row activity?

Customer Master_0313 v2.xlsx (15.5 KB)
Main.xaml (18.4 KB)
Template.docx (31.9 KB)

Sorry I cannot get the problem. But here is file, could you please help. Many Thanks.

Clear the Index property.

And try:

NumberS = CurrentRow(0).Tostring

Or

NumberS = CurrentRow("Numbers).Tostring

Or

NumberS = CurrentRow["Numbers].Tostring

Hope it helps.

Hi,

Please just remove NumberS at Index property of ForEachRow. Can you try the following?

Main.xaml (17.9 KB)

Regards,

It works!! Thank you!!

1 Like

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