Help - how can I paste random number into Notepad (find and replace in Notepad)

Hi all :smile:
New here but have been using UiPath Studio for a few months. I was hoping someone here can help me as I have encountered a small challenge.
I have now assigned a random via a variable and it pops up in a message box - however, I would like the number to be copied/written into a text field in Notepad - can anybody help on how to do that?
Thank you so much

Hi @Sus-Mus

You are the getting the output in a variable right pass that variable in Write Text File activity.

image

If your message box is getting printed in the loop please use Append Line to write the text into Notepad.
image

Regards

Hi @vrdabberu
Thank you so much for your help - however I keep getting this error as my variable is not a string, but Int32 and the Write Text File does not allow that. Is there a way to get around it? The variable cannot be a string - it has to be a random number
Thank you so much and have a great day

Hi @Sus-Mus

Give the syntax in Text as Random.ToString since Random variable is of DataType System.Int32.

Regards

Thank you very much for your help @vrdabberu! It worked - woop!

1 Like

Hi @Sus-Mus

If you find the solution please do mark as solution to close the loop. Happy Automation!!

Regards

1 Like

Sorry :smiley: :sweat_smile:
This is first topic and I’m a newbie, so my mistake
Thanks again

1 Like

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