The prompt in input widget not detected while submitting a form (Mobile dev)

Hello everyone, i'm developing a mobile app for internal project with Outsystems 11. Newbie here.

I've encountered with this problem in the submit form. So i created two inputs that already generated from the userID and requestID (REST API), those two inputs were disabled from the user to editing. I have set the prompt in the input widget property, this is how it looks like:



The value is indeed appeared when i tests the app, but the validation failed and says "required field" like its empty.


Is it the API variables that didn't synchronize properly? Or the widget itself? Or else?

Sorry for the bad grammar, it's not my native language

Hi Aditya,

The prompt is not a value. It's used to say something like 'Select a value' or 'Enter your Request Number'.

To have a default value, you need to assign it. You can use a form with GetLocalEmployee as its source. Then you can use the Form field as the variable for the input.

Regards,

Lennart

Hi,

It seems you are filling the input with the value of the "Prompt" it isn't right, the value of the input must be filled with value of the variable.

Hope it helps :)

Hello Aditya, 

Are youbworjing with mobile? 

If you are using an aggregate to fill in the inputs, use the OnAfterFetch of the aggregate to set the default value for these attributes. 

In any case, you need to set the attributes or variables bound to the inputs. The prompt is just a message to the user (about what it should put in the input, or the format, etc). 

Cheers

Lennart Kraak wrote:

Hi Aditya,

The prompt is not a value. It's used to say something like 'Select a value' or 'Enter your Request Number'.

To have a default value, you need to assign it. You can use a form with GetLocalEmployee as its source. Then you can use the Form field as the variable for the input.

Regards,

Lennart

thank you everyone for kindly responses, oh i thought the "Prompt" does also mean as a value..


do you mind to show me on how to do it? or there's any reference/tutorial?


Solution

Hi Aditya Eka Prabowo,

If you are using aggregate to get data there is onAfterFetch events

so you can add client action in which you need to assign your variable (In your case FormHSECard.NIP with GetLocalEmployeesList.list.current)

Solution