How to save a form input in the database?

I have created a form to save new "Players". In the form I have a dropdown  menu where I can select the position of the player in the field. However, when I click save everything gets saved to the database except the info selected from the dropdown. 

The dropdown uses a SQL query to show  the data located in the "Positions" column from the "Positions" table as I am asked from my teacher to do so (green already works, orange doesn't work):

"Player position is selected from drop down menu

  • create new data structure and store player positions in the new structure
  • use SQL-query to get the list of all possible player positions and display the contents of the list in position drop-down list
  • if positions are fetched some other way, full point will not be granted for this assignment
  • team name is selected from drop down menu
  • save data to data base (Partially works)
  • add Back button to navigate back to the start screen."

I can't seem to figure out what is missing. Any help is much appreciated! Below I included a copy of my project.

ProjectWork.oml

Hi 

You need to assign the value of dropdown in current player object 

Attached is the oml

ProjectWork_solved.oml

Thanks a lot!

Hello Basil,

I have checked your OML, you are passing all current value in Create operation but as I saw your dropdown selected value you are storing in the different local variable

I have attached Screenshot , which added one assign before the Create operation this will solve your problem
(Second way / To ignore this assign / for better ness you can directly give GetPlayerById.List.Current.Player.Position as variable property in this way your problem will solve
)

Hope this will help you


Thanks and Regards,

Akshay Deshpande

Thanks

Hi 

You need to assign the value of dropdown in current player object 

Attached is the oml

ProjectWork_solved.oml

Thanks a lot!

Hi @Basil Omsha

Try to set value selected of Position dropdown in the variable that you are using to save in your database.

For instance, value of Birthday field is set on GetPlayerId.List.Current.Player.BirthDay. 


So, position value selected should be set in GetPlayerId.List.Current.Player.Position.

Because in your saving logic, you are sending GetPlayerById.List.Current as a Player


I hope  it helps.

Thanks!

Hello Basil,

I have checked your OML, you are passing all current value in Create operation but as I saw your dropdown selected value you are storing in the different local variable

I have attached Screenshot , which added one assign before the Create operation this will solve your problem
(Second way / To ignore this assign / for better ness you can directly give GetPlayerById.List.Current.Player.Position as variable property in this way your problem will solve
)

Hope this will help you


Thanks and Regards,

Akshay Deshpande

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.