UD Form Customization ComboBox

I’ve created a customization for UD24 Entry. I have a single combo-box that is tied to SalesRep BO so I have a list of available sales reps. Then I have an ultragrid that is bound to UD24 EDV. I want to refresh the grid so it is filtered to Key1 = SalesRep in the combobox. Any advice?

SalesRep - UD24 is a one-to-many relationship.

I bet I need to call a GetRows method and structure the where clause to be Key1 = combobox value. Does that sound about right? If yes, I can probably muddle my way through this.

Could you handle that as a dashboard (with an advanced search) embedded in the form, I wonder? :thinking: I think I’ve seen a wizard for that but I haven’t used it yet.

This code will fitlter a EpiDataView

String str = "Key 1 LIKE '" + txtTagFilter.Text + "%'";
    EpiDataView edv = oTrans.Factory("UD24");
    edv.AdditionalFilter = str;
    edv.dataView.RowFilter = str;
    edv.Notify(new EpiNotifyArgs(oTrans, 0, EpiTransaction.NotifyType.Initialize));

txtTagFilter being your dropdown menu. I’m guessing your display item is the name and using the RepID for the backend?

I am tracking with you… but I can’t get the initial table to pull in to be able to filter it. On the default form, when you click the Search button it opens a new search window and it returns all the rows in the table (if you choose not to filter)… then you would pick from that list. I need to get that list of rows to populate in the grid when the form is loaded. Kind of like a dashboard that auto-refreshes when it’s loaded. Alternatively, the form can load with nothing in the grid if the I can get the grid loaded when I make a selection from the combo box that already filters to that sales rep.

I have tried to use the UD24 adapter with GetRows and GetList on the form load event, combo change event, as well as a button click. Nothing fills my grid with anything. I have hard coded the where clause to a value I know has entries.

@ckoch - I need to be able to delete rows from this screen also so I didn’t go the route of a UBAQ/dashboard.

You’re going to start having to do a lot more in the backend soon enough. You might as well get used to it now.

I’d use a dashboard.
Do your deletes in the BAQ BPM Update or run a custom action.

2 Likes

I ended up doing the extra column and a BPM to delete the rows. It’s working!
Thanks!

Dan