Arduino, solenoid driver and current limiter

I use PWM because the solenoid valve is used for an hydraulics proportional valve to control the oil flow.
The valve is not ON/OFF, but it opens accordingly with the user input.

I have different valves which require different maximum currents and I want to avoid to test each valve and to adjust the pwm each time. Moreover, I need to change the max current by software depending on some user inputs.

I guess the limiting chip is the only solution to my problem..