DropDown doesn't update to database

I don't know why, but after I saved typing the form, data are not updated into database.

as my picture, environment, physical visual, OS and server catagory, are just blank even I typed and saved the form

above. For instance, take environment as an example, I listed up its distribute, and all set-up information.

mvp_badge
MVP
Solution

Hi Runsu,

You're most welcome.. Glad to help you :)

Apology for the late reply. Please refer to the following points... 

1) The Schedule property of the data bootstrap timer is by default set to ‘When Published’ - hence the associated Data bootstrap server action gets executed every time the respective application module is published.

2) Refer to the attached .oml with comments/explaination

3) In the Server entity, you will have to define Unique Index on Name & ServerId attributes as shown below. This will ensure that the same value for these attributes cannot be repeated in other records of the Server table. 

For more info: Data_Modeling | Create_an_Entity_Index

Refer to the attached .oml file

I hope this helps you!


Kind regards,

Benjith Sam

Test.oml

Solution

Hi Runsu,

Please check the Attached OML. it's working as expected now.




ALso plz check it https://amitj.outsystemscloud.com/ServerManager/SystemList

ServerManager.oml

Thank you Amit! But as you can see, the last screenshot, system category only show index number, not the selection content. How to change this situation?

ServerManager.oml

Hey Amit, I solved it successfully!

Fetch data from systemcategory entity, and make label value expressed here!

Thank you very much!

wow, you can now mark this as a solution to this post.


AJ

Hi runsu zhang,

If my solution helped you to get clear the doubt then you can mark this one also solved. This will help others to get the solution for the same issue.


Can you please share your OML


Thanks for your replay! I attached OML.

Test.oml

mvp_badge
MVP

Hi Runsu,

Below is my observation and suggestions that I could suggest based on the analysis I had for the shared .oml file.

Required Code Chnages:

DataModel: 

Instead of considering the value of the static attribute as the Text data type for the Server Entity, I suggest you convert those attributes types to the corresponding Static Entity Identifier data type as highlighted below.

Server Data Bootstrap Action: 

From the bootstrap excel sheet, refer to the static attribute text value and store the corresponding Static Entity Id value to the Server Entity as a final record.

In the Form Save button action flow, you were missing the Server - CreateServer entity action node.

 

Besides the above code changes, I did minute changes in the screen > Form, Table & GetServers Aggregate definition. So observe the mentioned changes and let us know if you do have any doubts.  

Refer to the attached .oml file


I hope this helps you!


Kind regards,

Benjith Sam

Test.oml

Thanks Sam, problem solved! Thanks a lot. While as I'm studying on your code, may I ask you for a few question? Sorry I am a beginner.

1.BootsrapServers. This server action will act every time user runs application. Is it correct? Since I thought Import of the data from External EXCEL will only be executed once when I first time created this App. After that, outsystems will hold these data on online storage.

2.About Server Data Bootstrap Action:  I am still not clear with its logic.

Start--Getserver(to see whether data exist)--if empty, we need to convert from excel(test.xlsx)--then, get data from environment, OSSelection and so on---after this, I am confusing the logic of Convert From excel. What does this cycle do? And by the way, why don't you check whether GetEnviroment, Get OSSelection, GetPhyVis and GetServerCat empty or not? 

Or, Since all environment, OSSelecton, PhyVis and ServerCat are included in test.xlsx, what is the reason you get all these again after ConvertFromExcel?


3.I tried your code, all dropdown work well, however duplicate data can be saved no matter how many times. Could you please also tell me how to prevent user from doing duplicate entry? In my case, at least Server ID and Server Name should be unique.

Sorry for these additional annoying questions. Thanks for your kindness! 


mvp_badge
MVP
Solution

Hi Runsu,

You're most welcome.. Glad to help you :)

Apology for the late reply. Please refer to the following points... 

1) The Schedule property of the data bootstrap timer is by default set to ‘When Published’ - hence the associated Data bootstrap server action gets executed every time the respective application module is published.

2) Refer to the attached .oml with comments/explaination

3) In the Server entity, you will have to define Unique Index on Name & ServerId attributes as shown below. This will ensure that the same value for these attributes cannot be repeated in other records of the Server table. 

For more info: Data_Modeling | Create_an_Entity_Index

Refer to the attached .oml file

I hope this helps you!


Kind regards,

Benjith Sam

Test.oml

Thank you Sam! Very much learned.

Based on your advice, I redesigned my oml(real purpose one). I only tried one dropdown on one screen, but it still doesn't be stored... really frustrating..

NewSystem Screen, ??????dropdown as below.


Still no SystemCategory result shown in the list. ?????

And this is my flow, done by studying yours.

Could you please instruct me again? Thanks a lot!

I attached my OML here.

ServerManager.oml

Solution

Hi Runsu,

Please check the Attached OML. it's working as expected now.




ALso plz check it https://amitj.outsystemscloud.com/ServerManager/SystemList

ServerManager.oml

Thank you Amit! But as you can see, the last screenshot, system category only show index number, not the selection content. How to change this situation?

ServerManager.oml

Hey Amit, I solved it successfully!

Fetch data from systemcategory entity, and make label value expressed here!

Thank you very much!

wow, you can now mark this as a solution to this post.


AJ

Hi runsu zhang,

If my solution helped you to get clear the doubt then you can mark this one also solved. This will help others to get the solution for the same issue.


Hi @runsu zhang ,

In this screenshot you have created a new variable for system category Identifier but i am not sure you are assigning this variable to the system category attribute in save action to create system . 

I suggest you to change the SystemCat attribute type to the System Category  Static Entity Identifier data type and Set the dropdown variable to GetSystemById.List.Current.System.SystemCatId.


Hey Harika

Based on Amit and Benjith's help, I am kind of solving my problems! Thank you very much for your follow.

I am a beginner, so logic technical part is a little bit hard to be understood by me. Even I am wondering creating a dropdown in EXCEL is extremely easy costs merely 10-20seconds, while in outsystems, it costs me at least 3 days.... 

Hope I can accelerate my level of outsystems faster. 

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