Hello, good afternoon!!!
Hey everyone
I have 2 problems and I need a little help to solve them
Let's look at the first problem.
I have this table and within the table I have an INPUT. I need to insert a record into the database through the INPUT of the Current line. When I click on the button, I want to save the record in the database.
Let's look at the second problem:
But before saving it to the database, I need to check if what I'm typing in the INPUT is the same value that the qt/.product field is showing. It can only be saved to the database if both pieces of information are the same, as
I thank you all in advance
Hello Ubirailton.
First, your Conf/Qt/Pe column. It's just another attribute, right? If yes, in the button action you just save the current table object.
Before saving the object, validate both attributes as necessary.
If you still have any doubts, you can call me privately to get more information.
Bom dia Johnes tudo tranquilo
eu entendi mais deixa eu te fala eu estou com outro problema quando eu digito um número no primeiro input na primeira linha do grid. esse mesmo número se repete na segunda linha do grid. como eu resolvo isso, preciso resolver este Bug. depois eu resolvo o outro.
pode parecer um erro banal fácil de resolver para você.
mais para mim não é. estou aprendendo a mexer na plataforma tem 30 dias aproximadamente, mais já aprendi muita coisa sozinho e perguntei no fórum.
muito obrigado pelo seu interesse em me ajuda
Bom dia, pelo que vi, você ja conseguiu resolver, certo?
O valor está se repetindo pois você está usando a mesma variável para todas as linhas. Assim como cada linha da sua tabela é um produto com seus atributos, você precisa criar um novo atributo na tabela produto pra esse input.
Hi Ubirailton.
1. Let's say your table name is "Products".
2. Create a structure "Products_Struct" which will be a copy of your "Products" table.
3. Also, regarding your bug, it seems you are binding a local variable to your input. That may be the reason behind same number getting repeated in all the places.
4. If your user input i.e. "Conf_Qt_Pe" doesn't exist in your "Products" table, then add one more attribute "Conf_Qt_Pe" in the structure with appropriate data type.Keep this new attribute as non-mandatory.
5. You can use a data action to display data in your table.
6. Create a new data action in your screen e.g GetTableData. and create an output parameter of type "Products_Struct List".
7. Basically, your output parameter will be a list of "Products_Struct" structure.
8. In this data action use aggregate to fetch data from your source table and bind the values to the output parameter. Bind all values except for your user added input.
9. Change the source of your table to the output parameter of this data action.And also map all the row values accordingly.
10. Then create a screen action e.g. "Save" having one input parameter of type "Products_Struct".
11. Now bind this screen action to your button and pass the current table object in its input parameter.
12. In the "Save" action logic, first check if your INPUT is the same value as that of qt/.product.
13. If false, display error message. End the flow.
14. If value matches then call the update entity action of your table and update the current object. Refresh the data action, so that updated value will be displayed.
ok thank you very much I just found the solution