How to Set Range For Month in Modelbuilder?

586
4
02-04-2020 12:31 AM
AyokunleAdebisi
New Contributor III

I am building a model in ArcGIS pro.  I am trying to set range for months value list (January, February, March, April, September, October, November, December) whereby a user can select from , for instance, from January - March, or September - December. I have done it and it is working but the down side of it is,  it selects alphabetically i.e  if I select from April it will select  all values of month from A-S, but if I select from January to April, it returns null because numerically J does not come before A.. how can i solve this to make it select January to April or September to December to return a value. Like how can I set the value to select flexibly not minding the alphabetical order. Thanks

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

use numbers (1 forJanuary) for the value list or do the query on month range.  This will also get over the problem of having months that begin with the same letter when you only want one of them (ie March and May, June, July)

AyokunleAdebisi
New Contributor III

Thanks for your response..I thought of using numbers but, I don't want users to see numbers but months name. However for setting that range its not what I want to do , i will like the user to select flexibly the range like select from: January to: March.

0 Kudos
DanPatterson_Retired
MVP Emeritus

The only way that could happen is to preset month ranges, which would be a bit cumbersome.  You could get them to select a start month and an end month separately, then behind the scenes, index the range by number. 

AyokunleAdebisi
New Contributor III

hmmm...Thanks

0 Kudos