loop through widgets in an action


Is it possible to loop through the widgets of an edit record, (or e.g. the input widgets in a container) within an action with the for each element? If so, is it also possible then to determine the kind of widget?

for each widget in editrecord1 do begin
 if widgettype = input then

Regards, Harry
afaik, you might be able to do it in javascript, but my question is more, why do you want to do that?
Hi Joost,

This might come in handy eg for setting al background colors of input widgets, or when designing generic inputerror  logioc, or... I know that can be done in javascript, just wondered if it could be done in an action. New to the platform I may ask questions form an 'old school' programmers view who wonders what the 'limits' of actions are, sorry for that :)

Regards, Harry 
No problem, but OutSystems really is awesome in so many ways, so there are certain stuff you don't need to do yourself :)

in the other thread it's already mentioned, but look at this tutorial:  http://www.outsystems.com/how-to/validate-web-form-input/
Hi Harry,

If I may add, if you want to change the appearance of certain widgets in the Edit Record widget, you might as well use the widget's styles, or change the existing ones, namely for the error messages.


Paulo Tavares
Hello Harry,

As far as i know, its not possible to loop through the fields of an Edit Record using the for each element. The for each element can only iterate Recor Lists and the elements of an Edit Record are not in a Record List.