Hi everyone,
I am developing a web application designed for data intake by users, aiming for maximum user-friendliness.
There is a particular screen where users click a button to upload records from a pre-existing table via a server action.
Is there a method to automatically trigger this server action upon the user's entry to the respective screen, eliminating the need to click the button manually?
Current Situation: User transitions from screen A to screen B, then clicks a button to upload data.
Desired Outcome: User transitions from screen A to screen B and data is automatically uploaded into the table.
Thanks in advance.
Hi Stuart,
We all are learning and growing together so don't be sorry!
you can not set the screen action at start.
This Fetch property is associated with the data action and inside the data action you can call the server action (Which might contain the logic of saving the record in the database in your case).
The At start option defines that the Data Actions are triggered automatically when the screen is initializing.
Hi,
When User transitions from screen A to screen B then create the Data Action (Fetch property- At start) in Screen B and call the server action.
I'm sorry, I'm new to OutSystems.
I understand the concept, but I'm struggling to grasp how to set my screen action to trigger 'at start' and then call it.
Could you please explain the necessary steps?
I was wondering also if there's a way to converting my screen action currently present in screen B or if I have to create a new one.
Thanks
Understood, this approach suits my needs for a reactive web application. However, I've developed a traditional web application, as there are certain widgets, such as the "Editable Table," that I require and couldn't locate in the reactive web framework.
I'm curious if it's feasible to execute the data action you suggested within a traditional application.
No, Data Actions are specific to reactive applications only. we can not execute the data action within a traditional application. But you can utilize the Preparation in traditional application for the same purpose.
Widget Editable Table is does not exists in Reactive, however similar kind of functionality you can create with the help normal Table widget in Reactive application.
Of course, I could have combined the button action directly within the preparation. I didn't think of that. It works perfectly now. Thank you so much!
You mentioned that users upload records from an existing table through a server action when they click a button. Are you using a server action to retrieve the data and then populating it into local variables? If so, as @Mayank Dharmpurikar suggested, create a Data Action and incorporate your server action within this new Data Action. Set the output of the Data Action to match the value returned from the Server Action. You can then bind the output of the Data Action wherever needed. Additionally, if you want to keep the original button functionality, simply refresh the Data Action upon clicking the button to ensure everything functions seamlessly.