Hi everyone,
I need to copy this string below, keeping both the single quotes (') and the double quotes ("), and concatenate the string variables into them.
Unfortunately it gives me an error and I can’t get out of it.
Can anyone help me?
‘NameProcess’ = “+processname+” AND ‘Date’ >= “now.tostring” AND ‘conventions’ = “+conventions+” AND ‘NameTask’ = “+nametask+”
I should get this exact text:
‘NameProcess’ = “FIBERLINE” AND ‘Date’ >= “03/05/2024” AND ‘conventions’ = “wholesales” AND ‘NameTask’ = “ACTIVATION”
Ajay_Mishra
(Ajay Mahendra Mishra)
May 3, 2024, 9:06am
2
@AaronMark Where will be you using this query? in SQL or If Activity or any other activity?
Regards,
Ajay Mishra
I need to copy this string into a web tool of my company.
Ajay_Mishra
(Ajay Mahendra Mishra)
May 3, 2024, 9:23am
4
Hey @AaronMark
Use below mentioned query in assign activity:
str_Output = string.Format("'NameProcess' = {0} AND 'Date' >= {1} AND 'conventions' = {2} AND 'NameTask' = {3}", processname,Now.ToString("dd/MM/yyyy"),conventions,nametask)
Screenshot:
Variable Panel:
Regards,
Ajay Mishra
Ajay_Mishra
(Ajay Mahendra Mishra)
May 3, 2024, 9:31am
5
@AaronMark
If you need Values of Variables also in Double Quotes then use below mentioned query in the right side of assign activity:
string.Format("'NameProcess' = ""{0}"" AND 'Date' >= ""{1}"" AND 'conventions' = ""{2}"" AND 'NameTask' = ""{3}""", processname,Now.ToString("dd/MM/yyyy"),conventions,nametask)
Output:
‘NameProcess’ = “FIBERLINE” AND ‘Date’ >= “03/05/2024” AND ‘conventions’ = “Wholesales” AND ‘NameTask’ = “ACTIVATION”
Screenshot:
Regards,
Ajay Mishra
@AaronMark ,
Use this in assign activity.
"'NameProcess' = """+processname+""" AND 'Date' >= """+Now.ToString+""" AND 'conventions' = """+conventions+""" AND 'NameTask' = """+nametask+""""
Thanks,
Ashok
vrdabberu
(Varunraj Dabberu)
May 4, 2024, 12:33pm
7
Hi @AaronMark
Assign activity -> processname = "FIBERLINE"
Assign activity -> conventions = "wholesales"
Assign activity -> nametask = "ACTIVATION"
Assign activity -> outputString = "'NameProcess' = """ + processname + """ AND 'Date' >= """ + now.ToString("dd/MM/yyyy") + """ AND 'conventions' = """ + conventions + """ AND 'NameTask' = """ + nametask + """"
Message Box -> outputString
Regards
KevinE
(Kevin)
May 4, 2024, 3:02pm
8
Autopilot is great for simple activities like this:
1 Like