Can I connect two tables to a ComboBox?

Hi everyone, I’ve been really trying to work out how to connect two tables to a combo-box for a little while now.

combo GIF

My objective is simple I want the user to be able to use a combo-box that shows the data in a column of UD02, and when selected changes the value of another tables column in the background (specifically a column in ProjectTask_UD).

I have found it very easy to do this with only one table, where one column is viewed and the other is assigned as value.

Currently the settings below are showing one table using the same column for both view and value(I’m aware).

What would i need to add and where to achieve this?? Is this something I can achieve through using the UI properties or do I need to create a Data Directive to achieve this??

Thanks

Well, you’re using UD02 “values” to populate the combobox. But if the combobox is BOUND to your ProjectTask_UD table, it will set the value there.

The question is, where are you making this change and does the UI know what ProjectTask_UD record (row) to update?

Is the form your using already on the target ProjectTask_UD row? If so, just bind it to the required field. If not, you’ll need some kind of method to find the right row on the ProjectTask_UD table and then update with the selected value from the combobox.

2 Likes

Well yes and maybe no … The ProjectTask_UD table is just ProjectTask with extra added columns.

The combobox needs to be filtered to Company → ProjectID → TaskID

I believe the UI is aware of what record(row) to update in ProjectTask, However im unsure as to how the connection is made through the new table(ProjectTask_UD) Is this connection made through the columns ForeignSysRowID & UD_SysRevID???

How do i go about populating the combobox with UD02 while simutanously bounding ProjectTask_UD to it as well??? If this is not possible then I will happily make a method directive that changes RespID_c in ProjectTask_UD, when the user uses the combobox focused on UD02.

Epicor should handle attaching the _UD table to it’s parent table automatically, and appending the column, and update it when you update it.
So you should be working with ProjectTask.RespID_c vs. ProjectTask_UD.

3 Likes

ohh cool I didn’t know that thankyou, and in regards to how to achieve this with ProjectTask.RespID_c instead? everytime I attempt to wire up two different tables my combobox just breaks??

Am i misunderstanding this still? to bound the combobox it needs to be set in the properties no? not just on the correct page??

Your setup in the first screenshot looks right.
The only change to that should be the EpBinding → ProjectTask.RespID_c

This will update RespID_c in the current row of ProjectTask table.

It won’t save that row - it’s only going to update the dataview in memory, you would need to separately save it.

1 Like

ok that makes alot more sense, and in terms of saving it:


Would The SysSaveTool attached the page suffice? if not just steer me in the correct direction and ill figure it out.

Thanks again!

1 Like

Assuming that Epicor recognizes that the row is dirty when you change the combo box (it should) - then yes, SysSaveTool will work.

2 Likes