How to write concatenated string to text file

I am new to RPA, I have following question

  1. I have use case need to write concatenated string to text file
    Concatenated string will be formed using
    constants+variable+constants+variable

Write Text File activity - accepts only String value / only one constant/variable value in Text field … how to pass above combination values?

  1. if excel sheet - cell has multiple values with coma separator , how to access each value and assign it to variable?
    Using Split Text activity - able to split first string and remaining string … how to assign this string to variable and access it later in the process ?

@sachin_RAMPURE,

For this use like this.

Split will result in array of string.

You can access by it’s index like arrVariable(0) or arrVariable(1) so on.

Thanks,
Ashok :slight_smile:

thank you let me try out this

tell me the activity in Studio which gives 0th, 1st element in array … how you are using array variable ?

@sachin_RAMPURE,

Close the thread by marking the answer as solution. If any other query than this, feel free to create another thread.

Thanks,
Ashok :slight_smile:

Ashok Karale - Appreciate your quick response …will try then close the thread as suggested.

1 Like

This is incorrect. You can put the entire expression there.

if excel sheet - cell has multiple values with coma separator , how to access each value and assign it to variable?

I highly suggest doing the free training at academy.uipath.com - it will teach you these basic things.

You’re creating a variable for no reason. Just put the expression into the activity.

image

how do you iterate array list string if you don’t know the array size ?

With a For Each activity.

@sachin_RAMPURE

You can use a for each activity and pass the array string as list of items…then inside loop you can use currentitem to get each item for each iteration

If not if you want access separately …you can check the array size by arr.count and depending on count you can decide how many items are there

Cheers

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