61
Views
6
Comments
Solved
How to save Table data with input fields

Hi Forum,

I have a table and the first column having Edit/Save buttons. When I click edit button rest of the table columns will display input fields and when I save it I want to save the input fields values and I will display the label rather than input fields. I have tried with creating client action with every individual input fields onchange and it does not make sense. Could you please help me on this.

Thanks

Shanmuka Reddy

2024-12-02 13-16-47
Vipin Yadav
Solution

Hi @Shanmuka Reddy ,

I have done the same in the .oml file, please check the attached for reference. 

Demo URL : https://vyadav.outsystemscloud.com/Test/Products

I have added below screen shot for your reference.


Test.oml
UserImage.jpg
Shanmuka Reddy

Hi Vipin,

Thanks its working.

2020-11-25 10-45-32
Mostafa Othman
Champion

Hello,

When you click save you need to call your entity create / createOrUpdate action and assign values of these inputs to this action along with Id of record.

2019-01-31 08-54-57
André Costa
Champion

Hi @Shanmuka Reddy 

If I understand your issue correctly, you can add a new boolean attribute to your data source structure, like IsEditing

  • When you click "Edit," set IsEditing to True.
  • When you click "Save," set it back to false and call the Update Entity Action

For the fields you want to make editable, use an If statement: 

  • if IsEditing = true, display the input field; 
  • if false, show the expression instead. 

This way, you toggle between edit mode and view mode based on the value of IsEditing.


Hope this answers to your problem.

AC 

2021-01-28 10-02-59
Muhammad Mahmudul Hasan

Hello @Shanmuka Reddy ,

Bind your your input field with Data Source current Entity Attribute. on Edit pass Current Identifier to client action & filter Data Source using that identifier. You will have changes value there. Then save it with CreateOrUpdate action.  

UserImage.jpg
Rounak Rawat

Hi Shanmuka Reddy ,

I see you’re trying to save data from an input field into the database when a button is clicked. I’ve done something similar, so hopefully, my approach can help you!

SaveInputFieldData.oml
2024-12-02 13-16-47
Vipin Yadav
Solution

Hi @Shanmuka Reddy ,

I have done the same in the .oml file, please check the attached for reference. 

Demo URL : https://vyadav.outsystemscloud.com/Test/Products

I have added below screen shot for your reference.


Test.oml
UserImage.jpg
Shanmuka Reddy

Hi Vipin,

Thanks its working.

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