67
Views
4
Comments
Solved
For each row from database perform an action

Hello for everyone,

I need some help, i need to execute an action for each row from a database, let me explain:

I have a database with datas, so i need to for each row show this data and perform the action ok or not ok, then save at database.


This single row is show to the user:

COLUMN A | COLUMN B 

VALUE A     | VALUE B


Then, the user validates the data shown and clicks the button of ok or not ok, or it can also be a field where he writes the result of his analysis.

COLUMN A | COLUMN B | RESULT

VALUE A     | VALUE B     | ok


App will continue show every single row from database until user stop or close.

In the database, the above data that will be saved.


This is possible in OutSystems?

Rank: #387
Solution

Hi Matheus de Oliveira Alves,

I think you need to show list of all data that comes from your database . Then after add extra column in your table

Let's suppose Action column where your need to put two buttons ok and not ok. 

you need to make one screen action with one input parameter (datatype - boolean ) and another for Id. and associate ok or not ok buttons with that client action that ask for input parameter just pass True in Ok button and False in not ok button and current row id in Id input parameter.

and validate that your data in your action by checking true or false in your screen action and perform certain action that you want with true data or false data . If you have different table for Ok data then just update that table .

There should best if you have column for status in your database. Lets suppose your row is ok then in your screen action update your database with status OK or True (As you want) . At screen where your list of data shown apply filter according False Or Not ok status so that  only data shown with othrn than ok or True status.

Check This : Sample Screen


Regards 

Rahul.


DataTest.oap