Existe a possibilidade de marcar / pintar uma linha de situação de erro, para o usuário identificar apenas olhando para uma linha que pode pintar de vermelho por exemplo?

E também existe algum recurso para fazer disparar som?

Falta aqui um pouco de contexto.

A plataforma já providencia essa funcionalidade.

por exemplo, em traditional web, quando criares um form, os campos obrigatórios têm de ser definidos com a flag mandatory a true:

Depois, o botão que submete o form, tem de ter a validation como "Client & Server":


Isto vai correr uma validação client side nos campos que são marcados como mandatory, e vai correr a ação que está associada ao botão (server side no caso de traditional web), a qual deverá ter validações sobre os dados submetidos.

se algum campo não estive bem, cada campo tem dois atributos: se o campos é valido, e uma mensagem de erro:

por exemplo, um campo que só aceite inteiros, e o utilizador inseriu um texto. O atributo Valid deverá ser colocado a false e o validationMessage seria qualquer coisa como "Insire apenas digitos". Isto vai marcar o campo com uma linha vermelha e uma mensagem de erro em baixo do campo.

Por último, antes de efetuar qualque ação, o form tem uma propriedade read only - Valid:

Esta propriedade não vai ser visível dentro de um assign mas sim de um if.

Se o form não for válido, então nenhuma ação deverá acontecer.

Quanto ao disparar um som, é algo invulgar, mas pode ser desenvolvido usando javascript. Tens aqui algumas dicas:

https://stackoverflow.com/questions/9419263/playing-audio-with-javascript



Hi guys,

Just a heads up, we try to write in English on the forums so the most people can both help and be helped regarding the topic being discussed, so please, for future reference please provide at least an English translation of the most relevant bits? ;-)

I'll try to quickly translate the essentials:

Gregory Dapper wrote:

Is there a way of marking/painting an error status line, so the user can quickly identify [error situations] just by glancing at the line that can be tinted red for instance?

Also, is there any component available to play sound?

Bruno Machado wrote:

There's some context missing here.

The platform already provides that functionality.

for instance, for Traditional Web [...]

Here I'll just provide a higher level explanation, you can find extensive documentation here on how to do validations in OutSystems. There are also online resources (video presentation and exercises) on this on all the initial courses for Reactive Web, Mobile, Traditional Web.

The platform's Form Validation mechanism can be used for this: set required fields as Mandatory and assign to them the correct data types, then just set your button's validation properties accordingly (different between Reactive Web/Mobile and Traditional Web) and the platform will automatically mark as invalid required fields that were not filled or where filled with incompatible data types.

If you require further custom validations, you should do them on your screen action. Whenever you identify an invalid input, you can set that input's Valid runtime property to False, and its ValidationMessage runtime property to a meaningful error message to display to the user. Don't forget to finish off your validation logic with the final Form.Valid check, any invalid input will set the entire form as invalid and you will be able to stop the action in order to display the errors the user needs to fix before being allowed to execute the rest of the action.

As for playing sound, it's unusual, but you may achieve that using JavaScript. You can find some tips here:

https://stackoverflow.com/questions/9419263/playing-audio-with-javascript

Hope this will help everyone that cannot read Portuguese (and maybe some that can!).

Jorge Martins wrote:

Hi guys,

Just a heads up, we try to write in English on the forums so the most people can both help and be helped regarding the topic being discussed, so please, for future reference please provide at least an English translation of the most relevant bits? ;-)

I'll try to quickly translate the essentials:

Gregory Dapper wrote:

Is there a way of marking/painting an error status line, so the user can quickly identify [error situations] just by glancing at the line that can be tinted red for instance?

Also, is there any component available to play sound?

Bruno Machado wrote:

There's some context missing here.

The platform already provides that functionality.

for instance, for Traditional Web [...]

Here I'll just provide a higher level explanation, you can find extensive documentation here on how to do validations in OutSystems. There are also online resources (video presentation and exercises) on this on all the initial courses for Reactive Web, Mobile, Traditional Web.

The platform's Form Validation mechanism can be used for this: set required fields as Mandatory and assign to them the correct data types, then just set your button's validation properties accordingly (different between Reactive Web/Mobile and Traditional Web) and the platform will automatically mark as invalid required fields that were not filled or where filled with incompatible data types.

If you require further custom validations, you should do them on your screen action. Whenever you identify an invalid input, you can set that input's Valid runtime property to False, and its ValidationMessage runtime property to a meaningful error message to display to the user. Don't forget to finish off your validation logic with the final Form.Valid check, any invalid input will set the entire form as invalid and you will be able to stop the action in order to display the errors the user needs to fix before being allowed to execute the rest of the action.

As for playing sound, it's unusual, but you may achieve that using JavaScript. You can find some tips here:

https://stackoverflow.com/questions/9419263/playing-audio-with-javascript

Hope this will help everyone that cannot read Portuguese (and maybe some that can!).


great job. thanks for the heads up. I Replied because it was in Portuguese, but it makes total sense to have both of translations.

Gregory Dapper wrote:

O contexto seria uma tela de gráficos e linhas, onde quando houvesse um erro o sistema pintasse a linha inteira indicando onde está o erro

Existe a possibilidade de marcar / pintar uma linha de situação de erro, para o usuário identificar apenas olhando para uma linha que pode pintar de vermelho por exemplo?

E também existe algum recurso para fazer disparar som?



Gregory,

Por favor escreve em inglês também (tradução automática é sempre uma possibilidade), a língua franca deste forum é inglês, e é a melhor forma de teres resposta rápida a qualquer pergunta que coloques.

Gregory Dapper wrote:

The context would be a screen with rows and charts, where when there was an error the system would paint the whole row showing where the error was.

If you use a Table Records, it should be possible to apply dynamic styling to an entire row by setting the Row's Style Classes property, if I'm not mistaken. But the system will not do this automatically for you, it has no way of even knowing what is considered an error in a Table Records.

You would need to manually implement the error detection mechanism for your data, the mechanism to pass that info to the screen so that the row can use that info to decide which color to display.