How Can We Help?
Browse Pages can be configured in object groups via the XMPro Integration Wizard and using the SQL Connector option to create an Integration. However, this method cannot be used if the browse pages are expecting input parameters that are also located within the Object Group, as the integration will fail to differentiate between the different parameters and combine the results. For this Use Case, a custom workaround must be used.
First, open the EditPage popup window under the browse page’s Properties section
In the Browse Page Editor popup window, open the Data Source script
Add the below code snippet, modifying the input parameters, stored procedure and Data Connection as required.
System.Data.DataTable dt = new System.Data.DataTable(); System.Data.DataSet ds = new System.Data.DataSet(); string type = activity.GetControlValue("BW1080Type", groupId, lineNumber); using (System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(customSetting.Value(process.Company, @"Connections\MASTER"))) { conn.Open(); System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("int_Resource_GET", conn); command.CommandType = System.Data.CommandType.StoredProcedure; command.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Type", type)); dt.Load(command.ExecuteReader()); } ds.Tables.Add(dt); return ds;
After saving the Data Source, open the Page Objects window.
In this editor, you will be creating and mapping the columns from the stored procedure to the browse page grid.
- Description – Caption that will appear for the Browse Page column
- ID – System generated identifier
- Index – Used for ordering the Browse Page columns
- Name – User specified identifier
- Source – Name of the corresponding result column in the SQL query executed
- Target – If a row is selected from the browse page, what XMPro field will be populated.
- Leave blank if the column is only needed to be displayed within the browse page grid.
Now, your grouped browse page should be returning results dependent on the parameter in its individual row.
Comments are closed.