App Studio Events, combo-refill syntax

Has anyone successfully used combo-refill to refresh a combobox’s values in an event ?

Example:
I have a combobox with EpiBinding of OrderRel.ShipViaCode, it is populated via a BAQ and populates fine.

There are occassions that I regenerate the table that the BAQ uses and want the refresh that combobox values.

I believe that is what ‘combo-refill’ tool is for
this is how I have Value set:

image

I have also tried without the single quotes and without the braces but not getting a refresh

my trace shows no info from the event where combo-refill is used:

Hi @datadaddy

The combo should really be responding to changes to the underlying dataview related to the combo epBinding / epBindingTextColumn properties, you should not have to perform a combo-refill.

@NeilTaylor, thank you for the response, I appreciate

I understand that is typical, but in my case that is not possible,
I need to respond to changes in the dataview and generate valid entries for the combo dynamically (“on-the-fly”) based on that.

My question would then be, what is the purpose of combo-refill then ?
It must be there for a reason, I suspect it’s for cases like mine.

What is the correct syntax for the “Value” parameter ?
The tool-tip says:
“Set data binding using the format “View.Column” for the combobox that is to be refilled”
I set it the the EpBinding assigned to that combobox (without braces, with braces, with braces and single quotes) and it does not refresh.

This and the great majority of other widgets in the toolbox have no documentation (that I have found) on how to use, expecially when it comes to syntax. Often the tooltips are just the name of the parameter.

The only documentation I have found is from the ‘Application Studio Reference Guide’ where there is a section covering “most commonly used events” which covers 22 out of the 77 ‘widgets’ in the toolbox available for events (and mostly the more simple ones)

From memory ‘combo-refill’ was one of the first event types used within the kinetic toolbox when combos were first implemented, however over time it is no longer used within the base application and I will question this with UXP.

For reference, this is the syntax that is employed, so in theory the value would have not be wrapped in ‘’.

      "type": "combo-refill",
      "value": "ReportParam.SortOptions2"

What is being used to populate the combo list in your example, I could not see it in the post?

I am using a BAQ on a UD table to populate the combo, these are the values I have set for the combo (the contents of the UD table are refreshed dpendending on changes to the OrderRel dataview, which is why sometimes I need a combo refill)

Under Data section:
image

Under Reusable Combo section:
image

Under Advanced section:
image

thanks

Right, gotcha.

Ok, so reviewing this further combo-refill is intended to invalidate the combo which then triggers the retrieval of the rows. However, I don’t have anything to hand to confirm this but I am wondering whether this is not working for BAQ queries.

Can you retry the combo-refill but just set the vaklue to OrderRel.ShipViaCode (not wrapped in ‘{}’), if it works you should see the BAQ network call firing within the network tab.

If this is not the case I would suggest reaching out to support to raise an issue.

Ok, looking at the network trace I noticed something now

Case 1) when a field changes on the order release page, my UD table is updated, combo-refill is called and the combo is updated correctly.

The network output does show the ExecuteById call, payload shows the name of my BAQ and the response is what I would expect.

Case 2) when I change the current line, my UD table gets updated and combo-refill is called (by the SAME event as above), but the combo is not updated.

AND, the network output does NOT show an ExecuteById call, even though the console trace of the event still shows the combo-refill call…

I will put a support case in

Thanks

@NeilTaylor

Neil, I was thinking a way to approach this that would be simpler.
I would like to try to trigger an event when the combobox is clicked,
and then see if I can regenerate the dynamic data before displaying it.

But I don’t see any way to trigger the event
If I use Control/Click/EpiBinding, my combo is not in the list of possible bindings
image
If I use the behavior properties section of the combo there is only OnBlur and OnCreate
image

In classic / smart client you can do like this:
image

Do you know if it’s possible to trigger an event when clicking on a combo in application studio ?

thanks

@datadaddy
Hi Scott,

Unfortunately the only events that I’m aware of would be the columnChanging / columnChanged associated with the combo.

If you are able to populate the UD18 dataview by some other trigger / event then you could switch the combo to use the ‘ViewName’ property.

image

Neil

I have also tried using a DataView instead of a BAQ, I assume besides the view name, I still use the TextField (for display) and ValueField (for binding
image

This is my dataview:

and I have verified the UD table is being populated, but no values are showing up when I preview…
I also tried using the ‘View Column Name’ with the view, but that is a little confusing, becuase usually you need a Text and a Value field (and it shows no entries also)

image

@datadaddy

Hi Scott, would it be possible to compare against the Stock Status Report → Report Style combo properties as a guideline as I know that is where we use ViewName to populate a combo - thanks?

Just to try and aid further clarity I have attached all the underlying properties that are being specified:
image

Note in your case I would assume tableName / dataview name are the same it’s just that in the base app they are different:
image

I like the idea of looking at an example already created, In his case I don’t understand a couple of things

  • why does it need the tableName at all if it’s based on the view ?

  • why does the view have no columns ?

  • how does the StyleList view really exist at all ?
    there is not even a spot for DataSet ID, Data Table, Server Schema, etc

image

My view used to be based on a BAQ, which may have been part of the issue,
so I created a new view based on your example,
but it seems like the Data Table/Server Table should be specified

this is what I have now (but still no entries showing)

image

image

How does one find the properties you listed in JSON ?

In my case I don’t see dataSource and dbColumn as properties for the combo in app studio

thx, Scott

@datadaddy

I believe the viewColumnName is used for where the combo values holds a delimited list.

In your scenario, providing OFB_UD18.ShortChar01 / OFB_UD18.Key3 are populated in a row (CTRL-ALT-V) then in theory it should work, the only properties you would need to map out is the ViewName / tableName / TxtField / valueField.

Can you provide screen shots of the entire properties for the combo just for reference along with a screen shot showing the dataview / columns populated - thanks?

Just for reference the dataTable is the underlying table name as you can have multiple views all referencing the same table.

The ‘serverTable’ property is there to determine schema attributes.

okay, what I have now is below…

It seems strange to me that I still need tablename when in the dataview the view is mapped to ICE.UD18 table, also look at the tooltip for that property

image

it seems like that is yet another way to fill a combo
(BAQ, Rest Call, Static list, Table/Column with delimmeted list, DataView)

Regardless, I tried it both with and without the table name,
in both cases I get no data…the dataview is empty, which explains why the combo is empty

image

but here is a query on my UD18 that shows it is not empty:

image

here is the dataview definition:

and finally all the properties I have set on the combo:

image

image

image

image

image

image

Thx, Scott

@datadaddy
Hi Scott,

OK so the issue is that the the OFB_UD18 table is not being populated, if you hit F12 and look at the network tab can you provide a screen shot showing that the table UD18 is being retrieved?

Also, the Data Table property is the internal name for the table being referenced by the dataview it does not need to match the physical name. For reference I tend to just have the tableName match the dataview name unless I have multiple views operating over the same dataTable.

Do you have any parent / child relationships setup?

It is sometimes worth checking if you expand the ‘dataTable’ node to see if a row exists here, because the view could be filtering the rows contained within the datatable.

In your combo properties based on your Dataview mapping this should be OFB_UD18 not ICE.UD18?

image

Okay, I set both the table name and view name to OFB_UD18 and ran again

When I expand the dataview, to datatable/tabledata it still shows 0 rows

Oddly I started trace from the landing page before entering the order number, and looking at the network tab I see the calls for another combo I have setup (but it’s with a BAQ data source), but nothing for the combo that is tied to the view.

btw, I had also tried in the past, to create a view based on a BAQ and used that view in ViewName but still got empty results.

Thanks, Scott

@datadaddy

Hi Scott, could you provide me with the details of the BAQ that you are using to populate OFB_UD18 and the event that you are using to trigger it, such that I can attempt to replicate the issue you are facing locally - thanks?

@NeilTaylor

Hey Neil…

I’ve tried various things with different levels of success:
- BAQ as the data source on the combo
- BAQ Dataview as the data source on the combo
- Using the UD table as the data source on the combo
- Using Rest as the source on the combo (to call GetList on the UD table)
- Using a DataView based on the UD table as the source on the combo

In all these cases the UD table is first populated by a function when certain things change, the populating of the UD table is working regardless of which of the above methods are used to populate the combo.

When I started this post, I was actually using a BAQ as the source of the combo (not the BAQ dataview)…this had given me the best results…with one exception where I had to try to use the refill-combo widget to try to get the combo to refill (the UD table was updated as expected, but the combo did not reflect it)…this was the cause of my original post on this thread

After I hit that issue and when working with you yesterday, I decided to switch to a Dataview (not the BAQ dataview, just a dataview tied to UD18, UD18 is populated by the function).

It seems strange that for something so simple I can’t find the right combination…I can see the data in the UD table, but using a dataview just does not populate the combo…

To me it seems that the combo should simply only require the View Name, the Text Field, and the Value Field. I’m still not convinced the combo needs the Table Name since the DataView itself maps the View to the physical table…regardless I tried it both ways.

Was thinking about this last night…for the example you suggested (Stock Status), the dataview looks like this:
image

But any view I’ve created has additional fields at the top:

How is it possible the on the Stock Status view the Dataset ID, Data Table, Server
Dataset Id and Server Table aren’t even shown ? When I create a dataview those are always there…and I always have columns shown

If you wanted to experiment and see if you can get an example to work, all I would need is:

  1. put some data in a UD table
  2. create a dataview of that table
  3. populate a combo using the dataview
    that should be EASY right ?

I’ll also try to see if I can find any examples in the Epicor base functionality

Thanks again for you assistance

@datadaddy

Hi Scott,

Ok, right I see the confusion here apologies if I was not clearer initially.

Unfortunately, we cannot associate a BAQ / svc against the combo if you are using ViewName as the intention is that the dataview has been populated externally.

For example in stock status the StyleList is populated via the GetNewParameters network call:

Therefore are you able to trigger the BAQ externally to the combo via some other form of event?

Also, I think that could be an issue within application studio not showing all the properties for the StyleList dataview.