Type into activity gives me errors

@the.christopoulos If it is in UiPath, It is fine, Click ok and Check if you can execute the Type Into

In UIPath ofcourse :slight_smile:

I put the above in type into activity but I get error : End of expression expected before running it.

Any idea @supermanPunch what end of expression is expected?

@the.christopoulos I guess you need to put up Everything in a Straight Line, replace the Double quotes in the query with Single Quotes, Try this :

"Select [L400 Out 202001].CLTNUM, [L400 Out 202001].LINSNAME, Sum([L400 Out 202001].ZRSVAMT) As SumOfZRSVAMT, ‘50000’ As Retention, CDbl([SumOfZRSVAMT]-[Retention]) As ceded, [L400 Out 202001].CRTABLE From [L400 Out 202001] Where ((([L400 Out 202001].ZCNTTYP) In (‘ΖΩΗ’,‘UL’))) Group By [L400 Out 202001].CLTNUM, [L400 Out 202001].LINSNAME, ‘50000’, [L400 Out 202001].CRTABLE HAVING (((Sum([L400 Out 202001].ZRSVAMT))>‘50000’) And (([L400 Out 202001].CRTABLE) In (‘SP01’,‘SP02’,‘SP03’,‘SP04’,‘TT01’,‘TT02’,‘TT03’,‘TT04’,‘TT05’,‘TT06’,‘TWL2’,‘UL03’,‘UL05’,‘UL90A’,‘U90B’,‘U92B’,‘U92B’,‘U93B’,‘U93B’)));”

1 Like

@supermanPunch
Now the query in UiPath is without errors , but
when it is typed in access i get the below with part of the text ommited:

"Select .CLTNUM, .LINSNAME, Sum(.ZRSVAMT) As SumOfZRSVAMT, ‘50000’ As Retention, CDbl(-) As ceded, .CRTABLE From Where (((.ZCNTTYP) In (‘ΖΩΗ’,‘UL’))) Group By .CLTNUM, .LINSNAME, ‘50000’, .CRTABLE HAVING (((Sum(.ZRSVAMT))>‘50000’) And ((.CRTABLE) In (‘SP01’,‘SP02’,‘SP03’,‘SP04’,‘TT01’,‘TT02’,‘TT03’,‘TT04’,‘TT05’,‘TT06’,‘TWL2’,‘UL03’,‘UL05’,‘UL90A’,‘U90B’,‘U92B’,‘U92B’,‘U93B’,‘U93B’))); "

@the.christopoulos Can you show me a Screenshot of it , the String After typed into MS Access?

You just need to change the double quote at the beginning and at the end.

It’s not likely for the string to be cut off like that. Can you please try check SimulateType on the properties pane?

UPDATE: I noticed that the string does not write anything in the “” square bracket. Never worked with Access SQL, can it be changed with parenthesis instead?

I found this. Apparently only need to double bracket the open square bracket and not the closing one.

here

@the.christopoulos As @khairuln Simulate Type should help, If it did not help, We’ll find an another solution :sweat_smile:

Well I tested with the adding another open square bracket in its fine. @the.christopoulos should be able to close this questions.

@supermanPunch Here is the screenshot :

@the.christopoulos Simulate Type didn’t help?

@supermanPunch If i choose simulate type = true then

nothing is typed into access

1 Like

@the.christopoulos Ok, Then We need to figure out a way to Escape those Characters

1 Like

@the.christopoulos Instead of Type into, Can you use Set text Activity and Check ?

1 Like

@supermanPunch
I used the set text activity and for some reason, although there is no error, nothing is typed in access field .

image

1 Like

Greetings,

Please see below screenshot that I tested with notepad.

The variable text is the string you gave at the question above. Again, the explaination is here.

image

1 Like

@the.christopoulos Use Type Into Activity, Set Simulate Click To False and Use this Value :
"Select [[L400 Out 202001].CLTNUM, [[L400 Out 202001].LINSNAME, Sum([[L400 Out 202001].ZRSVAMT) As SumOfZRSVAMT, ‘50000’ As Retention, CDbl([[SumOfZRSVAMT]-[[Retention]) As ceded, [[L400 Out 202001].CRTABLE From [[L400 Out 202001] Where ((([[L400 Out 202001].ZCNTTYP) In (‘ΖΩΗ’,‘UL’))) Group By [[L400 Out 202001].CLTNUM, [[L400 Out 202001].LINSNAME, ‘50000’, [[L400 Out 202001].CRTABLE HAVING (((Sum([[L400 Out 202001].ZRSVAMT))>‘50000’) And (([[L400 Out 202001].CRTABLE) In (‘SP01’,‘SP02’,‘SP03’,‘SP04’,‘TT01’,‘TT02’,‘TT03’,‘TT04’,‘TT05’,‘TT06’,‘TWL2’,‘UL03’,‘UL05’,‘UL90A’,‘U90B’,‘U92B’,‘U92B’,‘U93B’,‘U93B’)));”

I have added an Extra “[” at the start of Each [ , in order to Escape it. Hope this works :sweat_smile:

1 Like

@supermanPunch This worked man!!! Thank you!

1 Like

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