Skip to main content
Solved

Getting Parameter Values from attributes


jackyd
Contributor
Forum|alt.badge.img+10

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.

Best answer by takashi

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.

View original
Did this help you find an answer to your question?

5 replies

mygis
Contributor
Forum|alt.badge.img+12
  • Contributor
  • June 14, 2016

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

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • June 14, 2016

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.


jackyd
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 17, 2016

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


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • June 17, 2016

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.


jackyd
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 17, 2016
takashi wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings