Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

how to find the maximum among records?

3401804Feb 21 2017 — edited Feb 22 2017

Hello. I work in Oracle EDQ 11.7.4, the customer has requested such a task. Did not find the maximum search components in this instrument have been decided by a Message Handling Script component.

I wrote in the component Message Handling Script script:

var max = 0;
for (var i = 0; i <records.length; i ++)
{
if (max <records [i] .input1) max = records [i] .input1;

}

for (var i = 0; i <records.length; i ++)
{
 
if (max == records [i] .input1) records [i] .output1 = 'max';
}

where input1 and output1 variables that default to the input and output values for the component. But the problem is that the time for one component processes only one record (records.length always 1) and after processing the record, goes to the second, third and so on and re-executes the code,   i.e. variable max = 0. Those. it turns out, all the records obtained at the output of 'max' which correspond to the input attribute of each record.

I'm sorry, I have bad English, Google Translate

This post has been answered by EDQ on Feb 21 2017
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 22 2017
Added on Feb 21 2017
3 comments
429 views