RPA Express Script

How to get the data stored in a text file and store it in a string recorder variable using custom actions script?

You can easily do it using this script

output = 'text'

def customScript() {
    text = RString.of(Resource.read("path-to-file", "UTF-8"))

But we have a ready action for it in the action library - Read file. Is it not working properly for you?

1 Like

I just wanted to try with custom actions :slight_smile:

1 Like

Hope you have fun using custom actions.
Feel free to write which custom actions you are interested in implementing.

1 Like

Hey how do i slice a string in custom actions. I am getting an error saying
’You tried to use a map entry for an index operation, this is not allowed. Maybe something should be set in parentheses or a comma is missing?’

Could you post your code here to have a look?

1 Like

I am able to run the code now. I was using a different syntax for slice and i corrected it . It works fine now.


1 Like