Hi All,
I wanted to have the retry logic during form submission only not to loose the form data,
Can any one suggest please,Below calling the api of form filled values and cheking the status of success.
Hi @Preeti zade ,
To implement a retry mechanism without losing your form data, you can create a simple Retry Loop directly in your action flow. Because your form inputs are bound to local screen variables, the data will naturally remain intact if an error occurs—as long as you don't navigate away or explicitly clear those variables.
Here is the standard OutSystems approach to build an automated retry loop:
Add a Counter: Create a Local Variable of type Integer named RetryCount (set the default value to 0).
Add an Exception Handler: Drag an All Exceptions handler into your action flow to catch any API failures.
Check the Limit: Inside the Exception flow, add an If widget with the condition RetryCount < 3 (or your desired maximum number of retries).
Loop Back: If True, use an Assign widget to increment the counter (RetryCount = RetryCount + 1), then drag the connector arrow back to your API call node to try again.
Handle Final Failure: If False (meaning all retries failed), use a Message widget to show an error to the user (e.g., "Submission failed. Please try again later.") and end the flow.
If the automated retries fail and the flow ends, the user will still see their filled-out form data on the screen and can manually click your submit button again later.
Hi @Preeti zade
When the user clicks Submit:
Submit
↓
Validate
Call API
Success? Yes → Navigate / Clear Form
No → Show Error
Keep Form Data