开发者

Can we include a where clause in a udcx file?

开发者 https://www.devze.com 2023-03-19 07:10 出处:网络
I have an InfoPath form which has two data connections: Connection to a SharePoint list Connection to udcx file which connects to a SQL database and executes a view. This file is located in a \"Da

I have an InfoPath form which has two data connections:

  1. Connection to a SharePoint list
  2. Connection to udcx file which connects to a SQL database and executes a view. This file is located in a "Data Connections Library".

The query is something like this

select "Ultipro id" as "Ultipro_id","Employee E" as "Employee_E","Anapharm id" as "Anapharm_id","First Name" as "First_Name","Last Name" as "Last_Name","User Name" as "User_Name","Company","CmpCompanyCode","EE Home Country" as "EE_Home_Country","Department Name" as "Department_Name","Department Code" as "Department_Code","Reporting Location" as "Reporting_Location","Rpt Location Code" as "Rpt_Location_Code","EecJobTitle","EecSupervisorID","1st Lvl Supervisor" as "_1st_Lvl_Supervisor","Executive Dept Head" as "Executive_Dept_Head","HR Rep" as "HR_Rep","EecEEtype","2nd Level Supv" as "_2nd_Level_Supv" from "dbo"."Emp开发者_运维百科Detail" as "EmpDetail"

The view returns 2195 rows and in future this number can increase.

Is there a way to include a where clause in this query? The where clause should filter on the [User Name] column. In my InfoPath form, I have a people picker which should become the parameter of the where clause.

Is there a way to include a where clause without custom coding?


I'm afraid this isn't possible... i'd recommend writing a WebService instead of using the direct connection to the SQL-Server via the udxc file.

You could create an operation that takes the UserName as parameter, queries the database according to it, and returns the result set.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号