How to perform linq to connect activity

Hello All,

        my requirement is to connect to azure database and join 2 tables using linq ,to extract id of a table based on certain condition, i have successfully connected to azure using connect activity but i dont know how to perform next step please help me out.


@pranay.a Well, If you have the two tables in the form of two Datatables then you can use Join Datatables Activity. Have you tried it?

@supermanPunch not tried that will try and let u know

1 Like

am unable to figure it out how to extract my tables values from connect activity to excel
! can u please provide me any reference

@pranay.a I am actually not sure on Azure integrations or How to use it :sweat_smile: But if you are able to read the Excel Files using Read Range Activity to get the table data in the form of Datatables, then it shouldn’t be a problem. Can I ask is the Connect to Azure Activity related to Joining of Datatables?

@supermanPunch Actually my issue is to get id of a table when dynamic input string matches with table string, in visual studio through linq it is working so,in order to make it work in uipath also i have to perform linq operation on both tables, if u have any other alternatives to get this task done please let me know

@pranay.a Is ID a Column name in the table? Do you only want to get the ID values and not the Joined tables? Also can you post that Linq that you have used to get the Output ?

var item = _context.Items.FirstOrDefaultAsync(a => a.ItemName == Add.ItemNames);
i just need to get itemid value not more than that
(ItemId is column name)

@pranay.a Ok. But are you able to Read the Excel files using Read Range Activity ? Maybe you can give us a Sample Data of both the Excel files that you want to read?

@supermanPunch my data is not present in exce,l it is in Azure DataBase

@pranay.a Are you using Database Activities ? :sweat_smile: UiPath.Database.Activities ?

@supermanPunch yes i have used connect activity to connect azure it is working ,i donno what to do next !

@pranay.a Ok. What are the Table names in the database that you want to Compare and take the ID value?

Items & OrderRequest are the tables and i want to get itemId from Items table
@supermanPunch as i have already shared the linq u can see it for reference .

@pranay.a I think this is used to get the Item Id based on a matching Condition with ItemName Column.

Can you first maybe check the data manually in the database and give us details on the Schema of the tables and the Columns which needs to be matching? Also maybe some sample data would be great.


@pranay.a Can you tell me Which two Columns are need to be used for the Matching Condtion ? I guess One Column would be ItemName in the Second table but I didn’t get a matching value associated in the First table. If you can tell me the two Columns From two tables that need to match maybe an SQL query is all you need to get the output you need.

@supermanPunch The thing is based on dynamic string need to check ItemName(itemtable) if matches return itemid(itemtable) which will be placed in Itemid in OrderRequest(1st table)

@pranay.a Ok. I think I understand what you need. I’ll try to check with an SQL query to get the expected output you need.

@pranay.a May I ask what value might be present in dynamic String variable?