10
Views
7
Comments
Solved
Add record in list on button press

Hi All,

How can I add text typed in text box gets added to list widget on button press in reactive web app? I will type in one text after another.


Kindly help,

Thanks,

Jaydeep


mvp_badge
MVP
Rank: #75
Solution

Hi Jaydeep,

For the mentioned use case follow the below steps:

Steps to follow

1) Introduce an input control mapped with a local variable called TextVar of Text data type

2) Define a local List variable of Text data type

3) On the button click append the current Input Text Variable value (i.e. TextVar) to the local List variable as shown below

See this sample app | TextDemo


Hope this helps you!


Kind regards,

Benjith Sam

Rank: #18204

Hi Benjith,

I am able to append. but which widget you are using at end? how you did bind list to widget?

Thanks,

Jaydeep


Rank: #286

You need to bind TextList to the List widget by passing TextList to List widget's Source property as follows:


Hope it helps, Thanks

Rank: #18204

Thanks Benjith, Shweta..it showing in list. How you added header name to list?

mvp_badge
MVP
Rank: #75

You're welcome, Jaydeep.

Glad to help you :)

In the sample app, I'm using the Table widget which does have a Header Cell to add the Header name as shown below

Kind regards,

Benjith Sam

Rank: #286

Hi Jaydeep,

Are you using any local list or list from aggregate? Please confirm.

Also it would be great if you can share sample OML to help us understand what you are exactly doing and what you want.

Thanks

Rank: #286

Hi Jaydeep,

Here i have attached a sample oml to help you with the implementation of your question.

These OML includes both case, you can try with whichever is applicable to you

1) Adding input text to local list and show it in List widget

Demo Link :https://shweta-gedam.outsystemscloud.com/AddRecordToList/AddRecordToLocalList?_ts=637448440096941489

2) Adding input text to Database list and show it in List widget

Demo Link : https://shweta-gedam.outsystemscloud.com/AddRecordToList/AddRecordToDatabaseList?_ts=637448440743577295

Hope it helps, Thanks

AddRecordToList.oml

mvp_badge
MVP
Rank: #75
Solution

Hi Jaydeep,

For the mentioned use case follow the below steps:

Steps to follow

1) Introduce an input control mapped with a local variable called TextVar of Text data type

2) Define a local List variable of Text data type

3) On the button click append the current Input Text Variable value (i.e. TextVar) to the local List variable as shown below

See this sample app | TextDemo


Hope this helps you!


Kind regards,

Benjith Sam

Rank: #18204

Hi Benjith,

I am able to append. but which widget you are using at end? how you did bind list to widget?

Thanks,

Jaydeep


Rank: #286

You need to bind TextList to the List widget by passing TextList to List widget's Source property as follows:


Hope it helps, Thanks

Rank: #18204

Thanks Benjith, Shweta..it showing in list. How you added header name to list?

mvp_badge
MVP
Rank: #75

You're welcome, Jaydeep.

Glad to help you :)

In the sample app, I'm using the Table widget which does have a Header Cell to add the Header name as shown below

Kind regards,

Benjith Sam