How to enter different inputs for the same list item?

Let's say I have 20 students and there are two fields (Variable A, Variable B) that belong to another entity that I would want to input for each student.

I tried using the list widget (based on the Student List) but the input entered for Student 1 would be simultaneously entered for Student 2. What I want to achieve is something like this:


Student    | Input Box Variable A | Input Box Variable B

Student 1 | 20 | 25

Student 2 | 36 | 47

etc

Thank you.



Hi Vnf,

I tried using the list widget (based on the Student List) but the input entered for Student 1 would be simultaneously entered for Student 2.

probably there is problem with mapping. If possible, share your sample oml to better understand the issue and help you . 

regards

Seema

Hi,

As Seema points out there is so many information lacking for someone to help you.

For example what type of application are you building, the possible solution would depend on that.

  • Mobile
  • Reactive Web
  • Traditional Web

A generic answer given the limited information you provided will be:

  1. Create a (web)block with StudentId as input parameter
  2. Place the webblock in the list and assign the list current record student Id to the input parameter
  3. In the weblblock you put the inputs and logic to store it in the database

Regards,

Daniel

Hi there,

Sorry my bad. Let me specify some additional information.

I'm building a mobile application.

I have a StudentFeedback entity that has StudentID (Student identifier) entity attribute, StudentProblem entity attribute and StudentSuggestion entity attribute.

What I'm trying to achieve was:

1) To have a list of all students in the first column. The second and third column will have an input widget for StudentProblem and StudentSuggestion variables

2) Let's say there are 20 students. As soon as I finished keys in all 40 fields and save, I want to be able to store the data unique to the StudentID. I know I can accomplish that using For Each, but how to make sure that the variables will be stored to the correct StudentID? I've done similar things for the web application (using Table) and I'm not sure on how to accomplish it on mobile application.

What happened to mine was, Column 1 did list all students. And there were 40 empty input fields. The problem was when I keys in any value on the any input field, that value will appear on all other fields (because I placed the input field under the list widget as well).

Seema Pandey wrote:

Hi Vnf,

I tried using the list widget (based on the Student List) but the input entered for Student 1 would be simultaneously entered for Student 2.

probably there is problem with mapping. If possible, share your sample oml to better understand the issue and help you . 

regards

Seema

I agree w/ Seema here.

Hello Vnf,


I assume column 1 is mapped with the Current value of the source linked to the list/table, right?

Can you confirm that the same was done to the variable bounded to the inputs? 

i.e. Input_StudProb is mapped to StudentProblem.Statement and Input_StudSuggest is mapped yo StudentSuggestion.Statement?


- Emman

Emman Si wrote:

Seema Pandey wrote:

Hi Vnf,

I tried using the list widget (based on the Student List) but the input entered for Student 1 would be simultaneously entered for Student 2.

probably there is problem with mapping. If possible, share your sample oml to better understand the issue and help you . 

regards

Seema

I agree w/ Seema here.

Hello Vnf,


I assume column 1 is mapped with the Current value of the source linked to the list/table, right?

Can you confirm that the same was done to the variable bounded to the inputs? 

i.e. Input_StudProb is mapped to StudentProblem.Statement and Input_StudSuggest is mapped yo StudentSuggestion.Statement?


- Emman


Hi Emman,

Column 1 is mapped to GetStudents.List (using list list-group widget) (as I want to display all students. If I have 20 students, then there will be 20 rows).

At the moment (I think this is where I did wrongly), Column 2 is mapped to GetStudents.List (using list list-group widget) as well because I thought that in order for me to get the same number of input widget (20 students = 20 input widgets), I have to map Column 2 to GetStudents.List too. Same goes to Column 3.

I know how to do it in web application using table record widget. However, there was no such thing in mobile application.

I figured out that if I map Column 2 to other source else than Get.Students.List, I will not be able to get 20 input widgets.



Hi Vnf,


One list widget, with GetStudents.List as source, is enough for your case.

You can place adaptive columns inside the Content of ListItem1 to emulate a tabular layout.

You can then treat the outcome just like you do with table record widget.


In case you have more columns than available, then you can just place another adaptive column inside the columns.


Hope this helps!

- Emman

Emman Si wrote:

Hi Vnf,


One list widget, with GetStudents.List as source, is enough for your case.

You can place adaptive columns inside the Content of ListItem1 to emulate a tabular layout.

You can then treat the outcome just like you do with table record widget.


In case you have more columns than available, then you can just place another adaptive column inside the columns.


Hope this helps!

- Emman

Hi Emman,

It doesn't work because whatever value that I keyed in for Student 1 in the respective input box will also be simultaneously entered for Student 2.


Solution

Hi vnf,

I have made a demo of a possible solution (if I understood your use-case correctly). 

You can check the live demo here: https://vkoning.outsystemscloud.com/PreviewInDevices/?IsMobilePreview=True&DeviceName=Tablet&URL=/TableTableDemo/Student?_ts=637218767351732028

I also attached the application.

Kind regards,

Vincent Koning

Solution

Vincent Koning wrote:

Hi vnf,

I have made a demo of a possible solution (if I understood your use-case correctly). 

You can check the live demo here: https://vkoning.outsystemscloud.com/PreviewInDevices/?IsMobilePreview=True&DeviceName=Tablet&URL=/TableTableDemo/Student?_ts=637218767351732028

I also attached the application.

Kind regards,

Vincent Koning


Hi Vincent,

This is exactly what I was looking for!

I've added one more attribute named Status, then a button to Verify that the previous inputs entered were correct (Update Status to Verified). When the user keys in the value for the first time, the value gets updated into the database with the status Not Verified.

Thank you so much!