why '.setDataProviderValue(dataProviderID, value)'?

Hello all!

What is the difference in setting a value to a dataprovider by:

name = ‘Mr. Bean’;
respectively
controller.setDataProviderValue(‘name’, ‘Mr. Bean’); ??

Regards, Thomas

The effect is the same.

You can use the second when you are working with a generic script, attached to different fields where you want to do some processing, checking etc.

It was very handy in the pre 3.5 ages, maybe not so important nowadays since we have validators etc.

the use can be ```
forms[formName].controller.setDataProviderValue(fieldName, value);


Where formName and fieldName come from lasttriggered blabla ...

Thank you Marcel!

I think it will be a good choice to take

forms[formName].controller.setDataProviderValue(fieldName, value);

in my global methodes, or?

Thomas

tgs:
Thank you Marcel!

I think it will be a good choice to take

forms[formName].controller.setDataProviderValue(fieldName, value);

in my global methodes, or?

Thomas

Hard to tell.
I used it once or twice but not much to be quite honest.