Skip to main content
1-Visitor
April 28, 2020
Solved

Event Routers infotable inputs

  • April 28, 2020
  • 1 reply
  • 2140 views

Hello everyone,

 

I want to ask: why there is no data shape choosing for infotable input in events router function? It makes event router useless for cases when data shape of function output is needed - for example, if I want to use output infotable for dropdown, list or data grid.

 

I'm using TW 8.5

 

Thanks a lot

Best answer by Constantine

Hello @lala_guliyeva,

 

I don't know why, so I don't have an answer to your question.

 

However, as a workaround you can try the following trick, which works for us at least for Dropdowns:

  1. First configure your dropdown while it is bound to a data source with a data shape defined
  2. Save the mashup
  3. Replace the binding with Events Router, so that it asks you whether you want to replace the existing binding, and save again

I believe that it should also work for Grids and other widgets. The reason why it works is because even if you replace the binding to Data, the widget still keeps the old config (unless you change it again).

 

I'm not sure whether it's a bug or feature, but we've been exploiting it quite extensively.

 

Regards,
Constantine

1 reply

18-Opal
April 29, 2020

Hello @lala_guliyeva,

 

I don't know why, so I don't have an answer to your question.

 

However, as a workaround you can try the following trick, which works for us at least for Dropdowns:

  1. First configure your dropdown while it is bound to a data source with a data shape defined
  2. Save the mashup
  3. Replace the binding with Events Router, so that it asks you whether you want to replace the existing binding, and save again

I believe that it should also work for Grids and other widgets. The reason why it works is because even if you replace the binding to Data, the widget still keeps the old config (unless you change it again).

 

I'm not sure whether it's a bug or feature, but we've been exploiting it quite extensively.

 

Regards,
Constantine

1-Visitor
April 29, 2020

thank you for your answer! But it doesn't work for my custom data grid widget. I use another way: I send output of events router to one 'dumb' service that returns me the same infotable with defined datashape, but this is kinda ugly trick. Why I think that this is not right: 

  1. Personally I understand mashup functions as helper, 'technical' services, so if it's possible to return infotable with defined (or not defined) datashape from service, why we don't have save opportunity for function
  2. Everywhere when we can choose infotable as input or output type we have option of datashape choosing as well: for services inputs and outputs, for mashup params, for datashape properties and etc, so it seems strange that only in events router there is no such opportunity. 
18-Opal
April 29, 2020

I've just thought of another workaround, which is just as ugly, but should do the trick without waiting for the response from the server (it will still send the request though) -- bind the result of your event router to an INFOTABLE session variable and then bind it back to your widget.

 

If your custom widget is based on Advanced Grid, you might be able to configure the columns explicitly via a JSON parameter.

 

I agree that it should be supported out of the box.

 

/ Constantine