Record information from different locations


Hello people.

I have a problem that I haven't found a solution for days.

I have a grid with the list and materials to sell. When I click on the shopping cart, I go to another screen with other fields along with the description of the material and there the user types the quantity he wants to buy and the date of purchase.
Now my question comes in.
How can I get the grid query fields that I put on the screen along with the quantity and date that the user typed and recorded in another table called sales.
 
When I put the component on the screen that takes the information from the material table, then I can't, in the same component set it to record in the sales table.

I thank you for your help.


Hi, friend.

If I understand well, when the user chooses the product and quantity the system register a record on sales table, right?

If there's a ProductId in the sales table, you can get the products tables with the filter product.Id = Sales.productId.

Is that correct?





Hi friend.

That's right. But my problem is where to point the "source" to write in the sales table.
Because on the screen I have fields that are filled in the query and others that the user types.
If I point the source to the query I can't get what the user types. If I point the sorce to the form, the participants point to research and do not bring the information.





I get it.

You can create a structure similar to the table and add another fields as you need.

The image below shows an example, an structure with the Domain table (Id, Domain and Key attributes). After that, the UserId and Date were add to be field as I needed. Then you fill the structure with data from your db.

I'll try.
Then can I set the "createVenda" source with the structure?

Hi Jose,


just want to point out another option, where you don't need to create structures.

On your server action or entityAction call, you need to match the source into the input, but you can choose to do that at attribute level instead of at entity level.

Following is the default option when calling an action, and as you point out, if not all your information is in the SaleForm.Record, you will be missing information.


But instead of selecting a source entity with the dropdown, you can also expand the source with the '+' sign in front of it.

This will show you all the attributes in the source entity, allowing you to mix information from several diffent available variables into a single call.


Just another way of doing this,

good luck,

Dorine

José Clodoaldo J S JR wrote:


Hello people.

I have a problem that I haven't found a solution for days.

I have a grid with the list and materials to sell. When I click on the shopping cart, I go to another screen with other fields along with the description of the material and there the user types the quantity he wants to buy and the date of purchase.
Now my question comes in.
How can I get the grid query fields that I put on the screen along with the quantity and date that the user typed and recorded in another table called sales.
 
When I put the component on the screen that takes the information from the material table, then I can't, in the same component set it to record in the sales table.

I thank you for your help.


Hi Clodoaldo, can you upload the oml and then we can check and help you faster? or upload some pic of the problem






Thank you all.
I did it using "assiging".
It was very good.
Thanks.

Obrigado a todos.