Skip to main content

I wish to be able to find the maximum value in a data set for an attribute and then use this value to set the value at which a counter starts at.

I can get the value using the statistics calculator, but don't know how to pass it to a parameter for use b y the counter.

I need to do this for a number of dataset and counters in one workspace.

Thanks in advance

I am using workspace runners to mage the work flow, so could calculate and pass as published parameters in needed.

Hi @jackyd,

 

I have uploaded this custom transformer that you can use

 

 

https://hub.safe.com/transformers/iteratorcounter

 

 

I have attached also a sample workspace .usemaxvalue.fmw

Hi @jackyd, since you've got the maximum value calculated by the StatisticsCalculator already, I think that you can use the features output from the Complete port and set the attribute storing the max value to the Count Start parameter of the following Counter directly, like this.

Just be aware that the Count Start parameter accepts only integer. If the max value could become a non-integer value, consider inserting a process to test and modify the value appropriately between the StatisticsCalculator and Counter.


Thanks @takashi and @gisinnovationsb

These are great ideas, unfortunately i didn't explain myself very well.

I need to get the max value for table A and apply to a counter for Table B

Cheers

Jacky


Hi @jackyd, if you've got the maximum value for the table A through the StatisticsCalculator already, you can merge the Summary feature to the table B features unconditionally and then set the maximum value to the Count Start parameter in the following Counter. To perform unconditional merging, you can use the FeatureMerger with setting an identical constant value (e.g. 1) to the Join On parameter for both Requestor and Supplier, like this.


Hi @jackyd, if you've got the maximum value for the table A through the StatisticsCalculator already, you can merge the Summary feature to the table B features unconditionally and then set the maximum value to the Count Start parameter in the following Counter. To perform unconditional merging, you can use the FeatureMerger with setting an identical constant value (e.g. 1) to the Join On parameter for both Requestor and Supplier, like this.

Thanks @takashi, was just looking at it and came up with exactly the same method

Really appreciate you help. :-)

Cheers


Reply