Set filter value on dashboard's customization

Hello Everyone,

I have two customizations, one of them for MES and the other one is a dashboard customization. From a custom button on MES i open the dashboard customization passing the EmployeeNum as a parameter and receiving it on the other form, that logic works good… As you might guess, i use the employee num as a filter on the dashboard but i haven’t find the way of making this, i tried to assign it to EmployeeNum txtbox’s binding but the edv is empty, even when i’m debugging and the dashboard’s grid have information the edv is empty. Do you have any suggestions on how to do this?

....
this.edvV_SSE_PayTimeIndividual_1View = ((EpiDataView)(this.oTrans.EpiDataViews["V_SSE_PayTimeIndividual_1View"]));
....
private void MainController_Load(object sender, EventArgs args)
{
string empID = "";

if(lfo != null && lfo.ValueIn != null)
{
empID = lfo.ValueIn.ToString();
if(edvV_SSE_PayTimeIndividual_1View.Row > -1)
{
edvV_SSE_PayTimeIndividual_1View.dataView[0]["EmployeeNum"] = empID;
MessageBox.Show("Emp: " + empID);
}
}
}
...

This is the portion of code where i’m having troubles u.u
edvV_SSE_PayTimeIndividual_1View.Row is always -1

I’m using 10.2.200.5 btw

Hi All :slight_smile:

I solved the issue, for future references this is what i did:
1.- Declared custom module level textbox variable
Ice.Lib.Framework.EpiTextBox txtEmployeeNum;

2.- On InitializeCustomCode() referenced the dashboard’s textbox that i wanted to edit to this variable:
txtEmployeeNum = (Ice.Lib.Framework.EpiTextBox)csm.GetNativeControlReference(“87f97d11-b12a-458c-b6d9-a5a304b27583”);

3.- On MainController_Load()
empID = “”;

if(lfo != null && lfo.ValueIn != null)
{
txtEmployeeNum.Text = lfo.ValueIn.ToString();
}

oTrans.OnRefresh();

This made the trick :slight_smile:

Hi @feras23 I am trying to achieve similar to this but i can’t find a way to pass employeeNum as a parameter to my dashboard. would you please be able to guide me in some direction. i could not find any help online or epicor resources.
Thanks in advance