1707
Views
7
Comments
Solved
how set default value for input field
Question

Hello, 

how set a default value for input field?

I would like that as soon as the screen was opened the highlighted fields would already appear with some values defined by default.

I entered this data in the NullValue property, but I was not successful.


Can someone let me know what I'm doing wrong?

Best Regards, 

Jessica Marques. 

2020-09-21 08-42-47
Vincent Koning
Solution

Hi Jessica,

It's not hard. One of the final steps in you Preparation fase use a Assign widget and set a value to the source variable of the form. I have made a demo application for you that shows how to do this. This demo uses a variable (type Demo) that has 2 properties, Name and City. The name will be pre-filled with the value "Jane Doe". The setting of this value happens in the Preparation fase. 

I hope this helps.

Greetings,

Vincent

ForumDefaultformvalue.oap
2020-09-15 09-38-17
Jessica Marques

Vincent Koning wrote:

Hi Jessica,

It's not hard. One of the final steps in you Preparation fase use a Assign widget and set a value to the source variable of the form. I have made a demo application for you that shows how to do this. This demo uses a variable (type Demo) that has 2 properties, Name and City. The name will be pre-filled with the value "Jane Doe". The setting of this value happens in the Preparation fase. 

I hope this helps.

Greetings,

Vincent

 

 Hi Vicent, 

I did it as follows, but I still haven't been successful

I also tried to implement the values of this variable in the preparation in this way, but I still haven't been successful

let me know what I'm doing wrong?

Regards, 

Jessica. 

2026-01-15 03-18-59
Vijay Malviya

Jessica Marques wrote:

Vincent Koning wrote:

Hi Jessica,

It's not hard. One of the final steps in you Preparation fase use a Assign widget and set a value to the source variable of the form. I have made a demo application for you that shows how to do this. This demo uses a variable (type Demo) that has 2 properties, Name and City. The name will be pre-filled with the value "Jane Doe". The setting of this value happens in the Preparation fase. 

I hope this helps.

Greetings,

Vincent

 

 Hi Vicent, 

I did it as follows, but I still haven't been successful

I also tried to implement the values of this variable in the preparation in this way, but I still haven't been successful

let me know what I'm doing wrong?

Regards, 

Jessica. 

 

 Hi Jessica,

Please check your form, which record it is bind to.


like GetExamById or ExamEntities.

2020-09-21 08-42-47
Vincent Koning

You can set a value to the underlying variable. This will then be shown in the input box.

greetings,

Vincent

2020-09-15 09-38-17
Jessica Marques

Vincent Koning wrote:

You can set a value to the underlying variable. This will then be shown in the input box.

greetings,

Vincent

 Hi Vincent, 

Sorry for my ignorance, but how do I do that?

Regards, 


 

2020-09-21 08-42-47
Vincent Koning
Solution

Hi Jessica,

It's not hard. One of the final steps in you Preparation fase use a Assign widget and set a value to the source variable of the form. I have made a demo application for you that shows how to do this. This demo uses a variable (type Demo) that has 2 properties, Name and City. The name will be pre-filled with the value "Jane Doe". The setting of this value happens in the Preparation fase. 

I hope this helps.

Greetings,

Vincent

ForumDefaultformvalue.oap
2020-09-15 09-38-17
Jessica Marques

Vincent Koning wrote:

Hi Jessica,

It's not hard. One of the final steps in you Preparation fase use a Assign widget and set a value to the source variable of the form. I have made a demo application for you that shows how to do this. This demo uses a variable (type Demo) that has 2 properties, Name and City. The name will be pre-filled with the value "Jane Doe". The setting of this value happens in the Preparation fase. 

I hope this helps.

Greetings,

Vincent

 

 Hi Vicent, 

I did it as follows, but I still haven't been successful

I also tried to implement the values of this variable in the preparation in this way, but I still haven't been successful

let me know what I'm doing wrong?

Regards, 

Jessica. 

2026-01-15 03-18-59
Vijay Malviya

Jessica Marques wrote:

Vincent Koning wrote:

Hi Jessica,

It's not hard. One of the final steps in you Preparation fase use a Assign widget and set a value to the source variable of the form. I have made a demo application for you that shows how to do this. This demo uses a variable (type Demo) that has 2 properties, Name and City. The name will be pre-filled with the value "Jane Doe". The setting of this value happens in the Preparation fase. 

I hope this helps.

Greetings,

Vincent

 

 Hi Vicent, 

I did it as follows, but I still haven't been successful

I also tried to implement the values of this variable in the preparation in this way, but I still haven't been successful

let me know what I'm doing wrong?

Regards, 

Jessica. 

 

 Hi Jessica,

Please check your form, which record it is bind to.


like GetExamById or ExamEntities.

2020-09-21 08-42-47
Vincent Koning

Hi Jessica, 

Isn't this issue exactly the same as your other thread? https://www.outsystems.com/forums/discussion/63629/how-to-initialize-variables-in-a-form-field/

But to better assist you it would be helpful if you create a separate application that demonstrates this issue. When you have created this application you need to download it and attach it to this thread. We can then download it and better analyse what is going on.

Greetings,

Vincent

2020-09-15 09-38-17
Jessica Marques

Vincent Koning wrote:

Hi Jessica, 

Isn't this issue exactly the same as your other thread? https://www.outsystems.com/forums/discussion/63629/how-to-initialize-variables-in-a-form-field/

But to better assist you it would be helpful if you create a separate application that demonstrates this issue. When you have created this application you need to download it and attach it to this thread. We can then download it and better analyse what is going on.

Greetings,

Vincent

 

 Hi Vincent, 

You are absolutely right, it is the same case, the difference was that it is dynamic there and not here. My mistake here was that I had left value on the Null Vale property of the input.

Greetings, 

Jessica. 

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