159
Views
4
Comments
Solved
Close Feedback Message with JS
Application Type
Reactive

Hi guys, what's up?

I'd like to know if it's possible to let all the message feedbacks close by themselves with a JS like this:

setTimeout(function(){ $public.FeedbackMessage.closeFeedbackMessage(); }, 2000);

For example, I would like any feedback message in my project to remain on the screen for only 2 seconds, according to the code above, if this is possible, how do I do it?

Thank you.

2024-06-08 15-17-54
Nawaz Khan
Solution

@Gustavo Mor Yes you can use the Javascript Feedback API of Outsystems to control that and even you can display any type of message (warning, information, error, success) with same function to enhance the reusability and to avoid the use of AutoclosefeedbackMessage every time when you call FeedbackMessage. 

In the created example below, the feedback message will be auto hide based on the passed values in timeOutInMiliSeconds paramter to JavaScript or the user click on the feedback message before the timeOutInMiliSeconds reaches while the message types values can be passed as integer values take from the Outsystems JavaScript Documentation Here. (0 = Info, 1 = Success, 2 = Warning or 3 = Error )

Hope this will help



2025-12-15 09-29-24
Thibaut G
Solution

Yes, but you will have to integrate the JavaScript widget into the client action flow that initializes the feedback message for each instance. 


The AutoCloseFeedbackMessage clientAction in the example contains the suggested JS Code

2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Gustavo,

Hope you're doing well.

I'd suggest for you to take a look at this Forge component as it allows you to easily control the Feedback Messages of your application. Everything is done client-side using JavaScript.


Kind regards,

Rui Barradas

2025-02-21 07-07-34
Rishabh Tailor
Solution

Hi @Gustavo Mor ,

There is a forge component named Reactive Utilities, which provides a lot of other resources, including the one you are asking about.
I have used this personally in my projects too. There is a client action named CloseFeedbackMessageWithTimeout that has in input the time for which the message will be shown, then it will be hidden.

 

Link to forge component - Reactive Utilities


I Hope it helps. 

2025-12-15 09-29-24
Thibaut G
Solution

Yes, but you will have to integrate the JavaScript widget into the client action flow that initializes the feedback message for each instance. 


The AutoCloseFeedbackMessage clientAction in the example contains the suggested JS Code

2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Gustavo,

Hope you're doing well.

I'd suggest for you to take a look at this Forge component as it allows you to easily control the Feedback Messages of your application. Everything is done client-side using JavaScript.


Kind regards,

Rui Barradas

2024-06-08 15-17-54
Nawaz Khan
Solution

@Gustavo Mor Yes you can use the Javascript Feedback API of Outsystems to control that and even you can display any type of message (warning, information, error, success) with same function to enhance the reusability and to avoid the use of AutoclosefeedbackMessage every time when you call FeedbackMessage. 

In the created example below, the feedback message will be auto hide based on the passed values in timeOutInMiliSeconds paramter to JavaScript or the user click on the feedback message before the timeOutInMiliSeconds reaches while the message types values can be passed as integer values take from the Outsystems JavaScript Documentation Here. (0 = Info, 1 = Success, 2 = Warning or 3 = Error )

Hope this will help



2025-02-21 07-07-34
Rishabh Tailor
Solution

Hi @Gustavo Mor ,

There is a forge component named Reactive Utilities, which provides a lot of other resources, including the one you are asking about.
I have used this personally in my projects too. There is a client action named CloseFeedbackMessageWithTimeout that has in input the time for which the message will be shown, then it will be hidden.

 

Link to forge component - Reactive Utilities


I Hope it helps. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.