104
Views
3
Comments
[Editable Table Reactive Sample] I can't save updated data in database with my customized Editable Table Reactive
editable-table-reactive-sample
Reactive icon
Forge asset by Tsuyoshi Kawarasaki
Application Type
Reactive

I created my Editable Table app with this component like below.

After I add or update some records "Add Record" and click Save button then reopen the screen, the data isn't saved in database (Entity: SampleMaster). 



The added records should be saved in SampleMaster Entity but it doesn't work.


I suppose this logic I created is simple not complicated but  I wonder where I'm missing...

Would you happen to know the solution? 

I'm also attaching my oml for your reference.

It'd be nice if you could take a look at it and tell me about my mistakes.


Best,

MyEditableTableReactive.oml
2024-09-19 13-52-30
Kavinilammurugu (Kavin)

Hi Tsubasa,

You are fetching data using GetSampleMasters Aggregate


after fetching you are using OnAfter Fetch action to assign the Aggregate output to a local variable list called SampleMasterLIst

For the Editable table you are using the same local variable list SampleMasterLIst .

when the Add record is clicked , the new record is added to the local variable list SampleMasterLIst .

but while saving data in the SaveData action , you are using the Aggregate output.


you must pass only the updated or newly added records as a list to a server action and use CreateOrUpdate action in a loop.



UserImage.jpg
Tsubasa Yoshikawa

Hi Kavinilammurugu ,

Thank you. I managed to solve this. 

In addtion to that,

I actually have one more question. if you don't mind, I'd be grateful if you could give me advice.

I just wanted "Description" column to select input cell with Dropdown Search like this.


Firstly I created DropDownSearch Widget and set ClientAction (DropdownSearchOnChanged) as Handler like this.


I did like below in DropdownSearchOnChanged  client action then I set optionsList.


And I assign selected value to SampleMasterLIst.Current.Description.




 I thought this should be fine but it didn't work.  What I selected is not saved in database.

I wonder if I'm missng somewhere...

Do you have any ideas?


Regards,

UserImage.jpg
Tsubasa Yoshikawa

In the first place, I'm not sure if we can use dropdown search widget in a table and edit records and save them in database.


I googled it but I couldn't find good solution.. 

Is anyone familiar with this matter? 

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