How to auto populate input on the form

I wonder if anyone can advise me how to auto load a value from an entity to complete some of the input values on a form.

Hi Badar,

That is an really basic question you have that is covered by the learning tracks you can find on the OutSystems Learn site, i would suggest to follow the https://www.outsystems.com/learn/paths/2/becoming-a-web-developer/ course. That will i am 100% answer most of your questions when starting to develop applications with OutSystems.

But back to your question:

Drag your entity 2 times to a UI flow, OutSystems will automatically generate a list and a detail screen, with add button on the list screen, and all the functionallity to filter, add and update the data in the entity.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Badar,

That is an really basic question you have that is covered by the learning tracks you can find on the OutSystems Learn site, i would suggest to follow the https://www.outsystems.com/learn/paths/2/becoming-a-web-developer/ course. That will i am 100% answer most of your questions when starting to develop applications with OutSystems.

But back to your question:

Drag your entity 2 times to a UI flow, OutSystems will automatically generate a list and a detail screen, with add button on the list screen, and all the functionallity to filter, add and update the data in the entity.

Regards,

Daniel

Hi Daniel,

Thanks for your suggestion. I think more elaborationon my part is needed for this question So I have two different entities,

1: Activity (this contains the job details that a technician will complete)

2: Technicians (This contains the pay roll number and company ID for the technician)


Now When creating the new Activity then technician enters the customer name and other things but I want to read the PayRoll number and company ID from the Technicians entity (instead of making the Technicians enter it at the time of recording activity). Hope this explains my issue. I know how to create the edit and create functionality when only one entity is involved but in my case I am trying to read some of input the data of another entity.


Hi Badar,

Ok asuming the following:

1. Technician is the user that is using the application so should have UserId as primairy key (1-on-1 relationship between Users and Technician table)

2. The activity entity has a foreig key to the Technician entity.

Then you can:

3. Add a aggregate on technician with ID = GetUserId()  and use its Payroll number and Company Id on the form for new records.

4. In the original aggregate you can also join the technician entity, Outsystems will add the join condition for you.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Badar,

Ok asuming the following:

1. Technician is the user that is using the application so should have UserId as primairy key (1-on-1 relationship between Users and Technician table)

2. The activity entity has a foreig key to the Technician entity.

Then you can:

3. Add a aggregate on technician with ID = GetUserId()  and use its Payroll number and Company Id on the form for new records.

4. In the original aggregate you can also join the technician entity, Outsystems will add the join condition for you.

Regards,

Daniel

Hi Daniel,

Appriciate your reply, would you be able to give me an example from your data? or make one from mine thanks.