This can be done without any JSL BUT your data has to be in specific format (tall/stacked) and it should have limit columns.
If this won't work for you other option would be to split the data by grouping variable, set separate specification limits and use column switcher instead of local data filter.
Or you could use scripting solution. How it should be scripted depends on your data and where the limits are stored.
-Jarmo