How to save the values from a List that contains some CheckBoxes?
Application Type
Mobile
Service Studio Version
11.50.11 (Build 47949)
Platform Version
11.13.0 (Build 31107)

I'm a beginner in OutSystems, and I'm building a small app. I have imported an Excel spreadsheet that contains a sheet with a column with some boolean values:

https://docs.google.com/spreadsheets/d/1dzELYVtS9THSNUrTMO_t9ryqmMdVx9yN/edit?usp=sharing&ouid=108705040681726843540&rtpof=true&sd=true

I was able to create a preview of the list with the values that I want to display in a relatively nice view:

The last part that I'm missing is how to save the values in the Acquired? column. In common software development, I would get the ID of the column and make a query like an:

"UPDATE MyList WHERE MyListID = @MyListID"

However, in OutSystems, I'm not so sure how to save the change in the Acquired column in the database created. I guess I should do something in the OnChange event:

However, I don't know what to write or choose, any idea how to do it?

Thanks.

ShoppingList.oml

mvp_badge
MVP
Solution

Hi Federico,

As this is an DB record update operation, you will have to use the respective Entity update action.

Steps to follow:

1) Define an OnChange handler to the Checkbox control

2) Add an UpdateMyList entity action node in the OnChange handler of the Checkbox

3) Map the current list record to the Source field of the Update entity action

The current list record value will contain the selected boolean value along with the other attribute values 

Refer to the attached .oml file


I hope this helps you!


Kind regards,

Benjith Sam

ShoppingList.oml

Hi Federico,

As you mentioned in the question I have tried to do it.

Please refer to the attached OML.

make a nice day!! All the best.

Kind Regards,

Ajit kurane

ShoppingList.oml

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