Solved

Getting Parameter Values from attributes

  • 14 June 2016
  • 5 replies
  • 16 views

Badge +2

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.

icon

Best answer by takashi 17 June 2016, 03:16

View original

5 replies

Badge +8

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
Userlevel 2
Badge +17

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.

Badge +2

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

Userlevel 2
Badge +17

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.

Badge +2

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