How to update editable record column based on combo box value

How to update editable record column based on combo box value

  

Hi,

I have a combo box and a editable table as shown below.  This table has a checkbox in each record level and combo box value is already populated with the Type table column values.Please let me know how to implement below requirements.

1) Only after selecting checkbox at each individual record level, update option should be shown to end user

2) If end user wants to change Type column value in multiple records then need to select multiple record level check boxes and change the appropriate combo box value. After that click on update button. This should reflect combo box value in type column where check box is checked earlier.

 


Best Regards

For the number 1, I'd suggest a simple javascript to handle the checkboxes clicks enabling/disabling the Update button.

For number 2, if I understood correctly, yo only need a Screen action, triggered on the Update button click, that loops the EditableTable and, for each checked item, do an update. After that, you refresh the Aggregate and the EditableTable


Does that sound ok for you?

Hi 

I have attached oml file. Could you please let me how can we implement second point number. Also below is the visual representation of the code added.


Also could you please provide javascript code to implement first point. 


Best Regards




The logic isn't complete yet.

See the oml attached. It has already both solutions.

Notice that it's not necessary to have a Select attribute on the Contact table.

Hope this helps.

Thanks Melo.

> There is for each loop and If condition to check the clickable checkbox and it gets detected the record properly where check box is selected. But after that once we modify the value in combo box that combo box value is not getting updated in the table column. Update Contact action is not working. 

Could you please check it once.

What I want to achieve.

If I select one more many row by select check box option, and change the company name by selecting a value from combo box and clicking on update button should update all selected row's company name to new value as in combo box. If from combo box KSRTC is selected, all selected row should have KSRTC as company Name. 

 


Best Regards


Solution

Hey, it's quite easy. I'd suggest you to take the basic courses in the Outsystems Learning pages, so you can figure out how to solve these kind of issues by yourself, ok?

Now that your requirements are much clearer, it's clear for me that it'd be hard for you to accomplish what you want with your implementation. You were binding the combobx to the same list of ContactsTable and it would duplicate the companies names in the combo.

Besides that, the value from the combobox should be in a variable, so it could be assigned to the Company attribute in the Update logic.

I attached the oml with the adjustements needed.

Solution

Hi Melo,


Thanks for your support and suggestion.

** Here the value is getting updated.

* I want to check multiple rows, which is not happening. Only one row is getting updated. My requirement is if i select say 5 rows and update company name (say KSRTC) all five rows company should be updated with KSRTC.


With Regards