Gather data from a table and store it on another

Hi, guys,

I'm a newbie on Outsystems and have this situation on my internship:

I need to create an system to manage customers on a queue, waiting to be answered. So, the solution for the "password screen" was the following:

A table in wich one I show some records from a static entity. These records should be options to be selected.

On a column I have an opntion, and on the other I have a radio button. What I need to do is to get this selected option and insert it on another table, to show it on another page.

I can't use combo boxes, because this wouldn't be a good way to the customers interact with the application.


I hope I've been clear enough so that someone can understand and help me.

This is the screen where I should get the information.

Hello, 

If I got it right, if the other table is of a different entity from the database, you can keep the selected option in a local variable and then in your screen action you can assign the value of that local variable to the correspondent record attribute of the other table entity and make an update to that record...

If I misunderstood, please try to send the oml with the example.


Vera

Hi, Vera!

Thanks for replying!

Yes, you've got it right. That's what I'm trying to do. Assign the value of the local variable to a record of the other table. Outsystems gives me a sugestion, but I know that is wrong. I've already tested this suggestion and I've got an error: "[MJ0FAP005].DBO.[OSUSR_S0P_TIPOSENHA] with key 0 was not found".

I guess I have to fix something on my Entities. It should be something too especific.

But thanks anyway (:

Eduardo

Eduardo Silva wrote:

Hi, Vera!

Thanks for replying!

Yes, you've got it right. That's what I'm trying to do. Assign the value of the local variable to a record of the other table. Outsystems gives me a sugestion, but I know that is wrong. I've already tested this suggestion and I've got an error: "[MJ0FAP005].DBO.[OSUSR_S0P_TIPOSENHA] with key 0 was not found".

I guess I have to fix something on my Entities. It should be something too especific.

But thanks anyway (:

Eduardo


Can you send the oml of the module(s) please?
Or prints screens with the actions and the DB entities

Vera Mendonça wrote:

Eduardo Silva wrote:

Hi, Vera!

Thanks for replying!

Yes, you've got it right. That's what I'm trying to do. Assign the value of the local variable to a record of the other table. Outsystems gives me a sugestion, but I know that is wrong. I've already tested this suggestion and I've got an error: "[MJ0FAP005].DBO.[OSUSR_S0P_TIPOSENHA] with key 0 was not found".

I guess I have to fix something on my Entities. It should be something too especific.

But thanks anyway (:

Eduardo


Can you send the oml of the module(s) please?
Or prints screens with the actions and the DB entities


What is better for you to understand the issue?
If the oml is better, how do I export to send it to you?

Hi Eduardo Silva,


FIrst of all, you have that error, because you are losing your Value.

You should test in debug mode, to check when you are losing the OSUSR_S0P_TIPOSENHA value.


To share the OML:



Best regards,
PVN

Pedro Vila Nova wrote:

Hi Eduardo Silva,


FIrst of all, you have that error, because you are losing your Value.

You should test in debug mode, to check when you are losing the OSUSR_S0P_TIPOSENHA value.


To share the OML:



Best regards,
PVN


Thank you so much, Pedro!

I'll try to check the problem on debugger.

Solution

Hi Eduardo, 

First, why don't you use a single column List whether each line is one of the entries in the Static Entity, with a link or button to the action that saves the record, passing as input parameter the Id of the actual record? 

This way the user just clicks a button or link and generates a 'senha' :) 

In any case, what is the value property at the Radio Button? It should be something similar to YourTableRecords.List.Current.YourStaticEntity.Id.

Than, in the action that saves the record, you use an assign to set the record with the id saved in the variable, and any other required values, before inserting the new record in the entity... 

Cheers 

Solution

Hi,

Please check the OML file. I have added the Radio type input field and save the data in a table. 

I hope it will help you to get the solutions,

Thank you,

Sudip

Thank you, guys!

I've decided to use Eduardo's idea, but all of you contributed to my learning here.

And Sudip Dey, I'll study your idea too for further projects. Thank you (:

Cheers