Hi Team,
Hope you are well. Can you please let me know what should i give instead of string. I want to use it as a datatable.
Thanks for the help.
Hi Team,
Hope you are well. Can you please let me know what should i give instead of string. I want to use it as a datatable.
Thanks for the help.
May i know what data is ther ein varinvoiceidâŚif you just want it to be datatable then in variable panel change the type to datatable
Cheers
Hi @Anil_G ,
The data in the excel file which the flow is trying to read is
When i convert to datatable its giving the below error.
Use read range and also I guess you did not give anything in output of the read column.if you see in locals varinvoiceid is null
cheers
Hi @Anil_G ,
Thank you for the suggestion. once i created the output it changed to ienumerable and started working. But giving this below error. Should i open a new thread or
Hi @Anil_G .
Thank you for the reply. Sorry i didnt understand what you mean please. Is there anything i am missing?
Cheers,
Sri
In the run query activity properties for connection detailsâŚyou need to fill either existing connection or the other fieldsâŚbut not the both
Remove provider name and connection string as already wxisting connection is given
Cheers
Hi @Anil_G
Thank you. I have removed the provider and connection string. Its still giving me below error.
As per error it is failing at line CAMCM_SAPâŚTry running the query in db first and use the same syntax here
Please check this for info
cheers
could you please elaborate more ?
Hi @Anil_G .
Thanks so much. In db its working perfectly fine the same query.
But when i am passing the list of "Invoice number " in the UiPath i think something is going wrong.
The output of invoice number in UiPath looks like this
Please find below from db
I see there is a extract comma at the front of invocieâŚand also dont the invoicenumbers surrounded by single quotes?
Try printing the query and copy the same and run in sql and see if it worksâŚif not make changes to it accordingly
CACM_SAP looks like a db name that you are connecting to which ideally you will be giving in connection properties I believe
Can you log on to that db and then use dbo.tablename instead of cacm_sap.dbo.tablename
cheers
Hi @Anil_G
Thank you for the suggestion. I deleted everthing and recreated. So i could get rid of CACM_SAP error.
Where i am stuck is the passing the invoice numbers.
Assign activity - String.Join(â,â,invoice_output) - if i remove , then its giving error
âSelect T1.[SYS_ID] As System_id
,T1.[ACC_DOC_NUM] As Doc_Num
,T1.[DOC_DATE] As Date
,T1.[REF_DOC_NUM] As Invoice
,T2.[PO_DOC_FX_VALUE] As TOTAL
,T2.[VENDOR_NO] As Vendor_No
,T3.VENDOR_NAME_1 As Vendor_Name
From [CACM_SAP].[dbo].[SAP_TFR_BKPF] T1
INNER Join [CACM_SAP].[dbo].[SAP_TFR_BSEG] T2 On T1.SYS_ID=T2.SYS_ID And T1.[ACC_DOC_NUM]=T2.[ACC_DOC_NUM] And T1.[FISC_YEAR]=T2.[FISC_YEAR]
LEFT Join [CACM_SAP].[dbo].[SAP_TFR_LFA1] T3 On T1.SYS_ID = T2.SYS_ID And T2.VENDOR_NO = T3.VENDOR_NO
Where T2.VENDOR_NO =â0001009311â
And T1.[REF_DOC_NUM]= (ââ + strInvoiceID + 'â)â
Its giving the error - String constants ends with a double quote.
String.Join(ââ,ââ,invoice_output) Include single quotes as well
and
here single quote should be inside the double quote you gave out side
As I said print the string before you give here so that you know what string you are trying to give
cheers
Thanks @Anil_G
how do you generally print the string please?
Cheers,
Sri
use log message or write lineâŚor assign to a string variable and open it in debug mode from locals panel
cheers
Looking at the original error, wasnât this just a matter of a simple syntax error?
String.join([array of strings here])
The freehand format of an array is { string1, string 2, etc }, so surrounded by accolades.
I donât see accolades in your syntax in the assignâŚ
(I didnât bother to read through the rest of this post so I might be missing a few vital details ;))