"Write text file" syntax

Hey all :slight_smile:

syntax help, please

the original file that I need to write is

UIPATH_EV;
mc_host=‘server \ robot host \ name’;
msg=‘Transaction failed’;
mc_object_class=‘UIPATH_ROBOT_REPORT’;
mc_object=‘SA \SOLARIS \ AS400’;
mc_parameter=‘transaction name’;
mc_tool_uri= ‘LINK to screenshots’;
severity=CRITICAL;
status=OPEN;
END

when I switch the hardcoded text to variables - like that

“UIPATH_EV;
mc_host=‘server \ robot host \ name’;
msg=‘Transaction failed’;
mc_object_class=‘UIPATH_ROBOT_REPORT’;
mc_object=‘SA \SOLARIS \ AS400’;
mc_parameter=" +var1 +";
mc_tool_uri= ‘LINK to screenshots’;
severity=CRITICAL;
status=OPEN;
End”

I am getting this error

String constants must end with a double quote

additional information

  1. text file is for power shell command,enter\new line is for visualization only
  2. file type is going to be Baroc
  3. var 1 is defined with 1 apostrophe at start and end
  4. when I type the first string i don’t get any errors

any ideas?
thanks and have a good day

Hi @liran.levin ,

My guess with the error message that you got has something to do with the first line

“UIPATH_EV;

You need a newline variable to connect all the string on each line. Using activity “Get Environment” NewLine and store the newline variable to concatenate each line

“UIPATH_EV;" + newline +
“mc_host=‘server \ robot host \ name’;” + newline +
“msg=‘Transaction failed’;” + newline +
“mc_object_class=‘UIPATH_ROBOT_REPORT’;” + newline +
“mc_object=‘SA \SOLARIS \ AS400’;” + newline +
“mc_parameter= " +var1 +" ;” + newline +
“mc_tool_uri= ‘LINK to screenshots’;” + newline +
“severity=CRITICAL;” + newline +
“status=OPEN;” + newline +
"End”

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