Initialize variables in a new item screen

How do I set values to variables when a new Item is being created  in a new screen and the identifier is null. GetItemByID.List.Current... is null in this case and I cannot see how I can put a value to an empty input box in the UI.

Hi,


I don't know if I'm understanding correctly your question, and if working on reactive, tradicional web or mobile, but I believe that you can learn a little bit more in this videos:

https://www.outsystems.com/learn/courses/129/building-reactive-web-forms/

https://www.outsystems.com/learn/courses/114/developing-web-apps-outsystems-11/


Hope this can help.


Best regards,

Ricardo M Pereira

Ægir Örn Sveinsson wrote:

How do I set values to variables when a new Item is being created  in a new screen and the identifier is null. GetItemByID.List.Current... is null in this case and I cannot see how I can put a value to an empty input box in the UI.

Could you please explain some more details about your problem with some screen shot or oml sample


Salman Ansari wrote:

Ægir Örn Sveinsson wrote:

How do I set values to variables when a new Item is being created  in a new screen and the identifier is null. GetItemByID.List.Current... is null in this case and I cannot see how I can put a value to an empty input box in the UI.

Could you please explain some more details about your problem with some screen shot or oml sample


I am working on a mobile App, There I have a list and when user creates a new list item a detail screen is opened. I want to put a value by default in one of the fields. This is easy in the case of a datetime field where I can just put current date time as a default in the attribute definition of the table. But for another field that is not possible.


Ægir Örn Sveinsson wrote:

Salman Ansari wrote:

Ægir Örn Sveinsson wrote:

How do I set values to variables when a new Item is being created  in a new screen and the identifier is null. GetItemByID.List.Current... is null in this case and I cannot see how I can put a value to an empty input box in the UI.

Could you please explain some more details about your problem with some screen shot or oml sample


I am working on a mobile App, There I have a list and when user creates a new list item a detail screen is opened. I want to put a value by default in one of the fields. This is easy in the case of a datetime field where I can just put current date time as a default in the attribute definition of the table. But for another field that is not possible.


ok so you wanted to set some default value to your control like Textbox,Dropdown etc?


Also please check below details I done this for POC in your problem.


Create a variable, give it a default value, assign variable to an input box, publish and display page. The input box shows the default value fine. I suspect either you have linked the wrong variable, the values are being overridden or you have used the Null Value field which will "hide" the value if the variable is the same as the null value.