Employee Labor Balance Customization - Help Needed

I am working on customizing a dashboard called Employee Labor Balance. I need to add a right-click open with option for Time and Expense to the right side of the dashboard below.

The right-click open with needs to work on JobHed.EmployeeNum. I have added a Context Menu entry for it and tied it to the process ID of Time and Expense.

However, when I right-click on EmployeeNum I get no open with option. Any ideas on what I can do in order to get

Is the Employee column in the Employee Pay/Labor Summary grid straight from a table or a calc field?

Go into the BAQ that generates that data and check to see if that column was added in the BAQ Search tab as a BAQ Like Column


The employee column comes from LaborHed.EmployeeNum. Additionally, that column was added to the like column.

I thought the issue was with the BAQ and/or dashboard.

But it’s more likely that you won’t be able to use Open With, the way you want. “Open With…” is intended to open a particular record with the key field in focus.

But in Time and Exp, the EmployeeID doesn’t refer to a specific record to load.

That exactly what I’m trying to do. I’m trying to open time and expense with a specific employee ID. Thanks for the help Calvin!


Hey just added empID to the table in question and it can right-click open with Time and Expense Entry just fine. Now the problem is that it is not populating the empID into the Time and Expense Entry Form. I believe this has to do with TIme and Expense automatically populating the empID based on the current user, and when you right-click open with it sends an additional empID thus causing the form to bounce all credentials. How do we turn off the auto-populate procedure for Time and Expense Entry?

Check the “As Form Opens:” setting on the Options for that form:


Set it to “No Action”

1 Like


That got it to stop populating in the current user. Now the problem is that the Open with function does not seem to be passing the empID on the the T&E Entry screen. It just leaves it blank. Does this have to do with call context or a bpm of sorts, or did I miss a step on setting up my open with?

I think it’s l;ike a PO receipt. You start by entering the PO number, but that doesn’t actually retrieve any records. It just acts as a starting point for the receipt. Like how the EmployeeID is the starting point for the T&E entry. No Receipt record is actually retrieved.

See if you can create an Open With ... for PO Receipt Entry based on PO Number. I think you’ll have the same issue.


I was able to get it to populate the open with again using the settings it was on before but now its pulling all empIDs instead of just the one im trying to open with. Do you know how to handle the information being passed to the form through the open with?

Currently trying to follow this train of thought. I have a custom code set up on the Time and Expense Entry form:


But I’m getting the following error when I right click and open with on the Dashboard:

I’m not sure if it has to do with line 77 not having an entry for “(oTrans.EpiDataViews[”“]);”.I’m not really sure what would be there to begin with.

Did you at least try putting a

MessageBox.Show("strEmpID: " + strEmpID);

after strEmpID = TimeExpenseForm.LaunchFormOptions.ValueIn.ToString();

to make sure that’s even coming in as expected.


after another look, it looks like there isn’t the a “record” to be setting with the strEmpID. You may need to make a new blank record first, and then set it with th strEmpID

1 Like


We set strEmpID to blank right after the comment text and assign it to the in value passed from the dashboard in the second if.

I’ll also be completely honest I forgot to add a trouble shooting message to the code, so good catch there! Got the following result on code run:


And the following error:

It’s not my specialty … but I think you need to specify the object to make a the dataview for.

EpiDataView edvQuoteDtl = (EpiDataView)(oTrans.EpiDataViews["QuoteDtl"]);

See how that specifies "QuoteDtl"?

You probably want to run the T&E form manually, with tracing enabled to see what it is using.

1 Like


Got done tracing it. Which part of this am I looking to use?

Just a guess, but try EmpBasic


Just got done trying it. Error Changed:

what is Index -1?

Index -1 is probably the index of an array of records. Typically, arrays are referenced by their index with it going from 0 to NumOfElements-1. An array with 10 elements would be a[0] for the 1st, a[1] for the 2nd, … , a[9] for the 10th.

I take that error to usually mean that the array is empty - I.E. no dataset yet.

Try the following in a customized T&E Form

  1. Add a Button
  2. Add a click event for that button
  3. add the following code to the click event.
EpiDataView edvNav = (EpiDataView) (otrans.EpiDataviews["EmpBasic"]);
edvNav.dataView[edvNav.Row]["EmpID"] = "000412";

Save and launch that customization.

Clicking the button will probably give you the same error (unless changing "EmpBasic_EmpID" to "EmpID" fixed it).

If it errors out close and relaunch the form. Now before clicking the button, use New on the menubar to make a blank record. Then try clicking the button. If it works, then you know that the blank temp record must be created first.

We get this error when we use the button.


If I enter an empid then the button overrides it. If I clear the form and click the button we get the same error. I cannot create a new record without having an empid in first

Has anyone else ran into this Index -1 problem with an LFO before?