I make project user select folder then displace all file naame in folder in string


but not output in string format
error
BC30512: Option Strict On disallows implicit conversions from ‘Integer’ to ‘String’. The selected value is incompatible with the property type.

for_each_a

Hi @rohit_kumar6,

You should use currentText in write line activity instead of Item.Tostring.

Regards
Sonali

1 Like

Hi @rohit_kumar6

Use currentText.ToString to print the file names and make sure the Type Argument of For Each is String.

Regards

1 Like

Hi @rohit_kumar6

If you observe the Variables panel and then the Properties panel of the For Each.

You have declared item as String, but then used it under Index property of the For Each. Which gives Integer.

If you want the Index as String, please change the Data Type of the item to Int32. Then the item.ToString should work fine.

But if you are looking for the files in the Folder, it is stored in the variable currentText. Since it is already of Type String as per the Properties Panel, you can use it directly.

I hope this helps. If it solves your issue, do mark it as a solution
Happy Automation :star_struck:

1 Like

Hello @rohit_kumar6 wherever you’re assigning the value to a string variable, use .ToString() explicitly

Hope it helps

@V_Roboto_V thank you sir

1 Like

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