For context, I'm trying to make an Employee of the Month responsive website, but I'm having trouble with the "Add Employee" part. Basically, the administrator can select the employee and it should later appear on the home page. However, when I select the employee, it is not saved correctly in the database. Someone can help me?
Hi Inês,
I took a look but I see that you are not storing anything in Database. you need to call a EmployeeOfMonth CreateOrUpdate action, after your assign in your save action, passing as parameter your GetEmployeeOfMonths.List.Current.EmployeeOfMonth if you want it to be stored in database!
Because as your logic is now, when you navigate back to homescreen, nothing was really stored in EmployeeOfMonth so it's normal that you don't see it when you fetch data from that entity in the screen!
Let me know if this helped you,
Paulo
That's it! Thank you! :)
I would like to help you but you definitely need to provide more info (the .oml for example) or at least some screenshots or what error you are experiencing.
Let me know,
So, the list is like this:
The radio button has a handler that only allows to have a single option (named SingleOption)
The if condition
The assign
The rest of the data in the table is from the "GetUsers.List.Current.User.Name", is basically the list of all users.Then, when the button "Save" is clicked, the action "EmployeeSelected" is done
The assign:
The employee of months is supposed to show the list of all selected employees of the month (both the current month and the previous months)If you need more info just let me know! Thank you for the help!
Hello Inês,
In addition to Paulo's answer, you may try to debug your code and check what you are passing into the save action.
Kind regards,
Rui Barradas
Hi Ines,
Can you tell how you are storing data into database or if possibly please share oml
Best
Arun
Hi! The usual use of a Radio button, is a series of buttons that store each a different value to the one variable assign to all of them. I don't see that in your work, it seams you are using it as it is a check box.
So in addition to have forgotten to save the info in the data base as @Paulo Ritto noted above, it is advisable to, as @Rui Barradas suggested to debug your code to see what happens in each line when you click one of the buttons.
Regards
Graça