cancel
Showing results for 
Search instead for 
Did you mean: 

Best Practice for a given Scenario

Former Member
0 Kudos

Hi all,

Suppose I've a following scenario:

Show in a page, a list of materials and in this same page to show a line with informations based on agregated functions (Count, Average and other calculations).

Initially I thought in declare a OutputMaterialsXML parameter that contains the material list and others OutputConsolidationXML parameters that contains the average, count based on material list, so using XPath I can populate all output on once.

If I want to use XAcuteQuery I need to decide what the output I will show, so I will need to create tow XAcuteQuery, but it will impact on performance, because I'll need to execute the same transaction two times.

Does anybody has a good approach to this case?

Best regards

Accepted Solutions (0)

Answers (2)

Answers (2)

jcgood25
Active Contributor
0 Kudos

If your Material list document is not excessively long it probably wouldn't be too much overhead to add a few extra columns using the CalculatedColumn action block. These extra columns, even though the number would be the same for all rows could contain a column for each of your aggregated functions.

Then in your iGrid just set the Column Width for these addtional fields to zero and upon UpdateEvent of the grid you could javascript them from Row number 1 to your desired html elements, etc.

Former Member
0 Kudos

Hi Jeremy,

I liked this solution for a little amount of data. I'll try it.

Best regards

Former Member
0 Kudos

You could try having one transaction do the calculations and put the data in a Queue or Queues and have the second just read from the Queue/s

Former Member
0 Kudos

Hi Christian,

This is an interesting approach, I'll think about it.

Best regards