Question
Zensar Technologies Ltd
IN
Last activity: 22 Mar 2024 22:04 EDT
Editable Data Page As Table Source
Hi All, I am performing insert, update, delete operation in one data type. Editable Data Page created for this data type. Created section in Work-Case type class
In above section, I have one table, where Source = Editable Data Page, Structure = List, Scope = Thread
I gave one Save button to save all the records that user enter in the table to database. By Refresh section calling activity.
In each row I gave delete button, to delete particular row. In delete button I added following actions:-
a) local action for confirming before deleting record, to delete that particular record from database table called activity in flow action to delete record from database table.
b) action to refresh section and flush editable datapage.
Scenario:- First user add one row fill details in that row, add second row fill details in second row
When user hit delete button for second row that table got refreshed and all the entries got removed from the table. I tried to put delete item action before calling local action, but it is giving error, that that local section belongs to data- class.
So, how can we simply delete particular row that users want to delete before clicking saving button. Thanks
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 22 Mar 2024 22:04 EDT
Bits in Glass
IN
You can pass index of the page to the DT. Then set pydeletedobject = true. Then use removedeletedobject function.
Else loop your editable pagelist, if pxsubscript! = param. Index
Append to temppagelist.
Now remove editable pagelist, now set again from temp pagelist.
Zensar Technologies Ltd
IN
@Anoop Krishna Hi Anoop, can you help me with this scenario. Thanks In Advance.
Bits in Glass
IN
@AbhishekC1725 you can make of removedeletedobject function. First you need to set pydeletedobject property to true to that particular index page. Then when the above function runs, that index page will be deleted.
Use DT to implement this.
Zensar Technologies Ltd
IN
@Anoop Krishna Hi, Can we implement this in another way.
I have above table in Work-CaseType class section.
Where source = Editable DataPage. Structure = List.
Table = H-H-Data-GroceryEdit here I defined two key Case ID <= Work Object Case ID
GROID <= Grocery ID generating unique id using OOTB function.
On click of Save button running activity to save record.
When we click on delete button, one location action I am displaying confirming before deleting the record. In post processing of flow action calling activity to delete that record from data type table.
As it is editable datapage if record is there in data table then it is deleted and I refreshing section and flushing editable datapage no issue working fine.
Suppose its a new case, no records for this case in data table. User added 5 records in table.
And click on delete button, the whole table record that user added data got deleted.
So how to handle this thing?
Bits in Glass
IN
@AbhishekC1725 I hope you are doing deletion feature from flow action.
the ultimate aim is
1. Delete specific item from editable dpage.
2. Refresh the section
Zensar Technologies Ltd
IN
@Anoop Krishna Yes, correct.
Accepted Solution
Updated: 22 Mar 2024 22:04 EDT
Bits in Glass
IN
You can pass index of the page to the DT. Then set pydeletedobject = true. Then use removedeletedobject function.
Else loop your editable pagelist, if pxsubscript! = param. Index
Append to temppagelist.
Now remove editable pagelist, now set again from temp pagelist.
Updated: 22 Mar 2024 22:03 EDT
Zensar Technologies Ltd
IN
@Anoop Krishna Hi, Thanks Anoop, Now all issues resolved.
I passed pxListSubscript as seen in screenshot.
And in DT I use below two steps
1) Set Param.myIndex equal to Param.GetIndex
2) Remove D_BIEList[CaseID:Param.CaseID] .pxResults(Param.myIndex)
Thank you so much again @Anoop Krishna
Aaseya IT Services Pvt Ltd
SA
Ensure that the refresh action is targeting the specific row being deleted and not the entire table or section. If the refresh action is incorrectly configured, it can cause the entire table to refresh and remove all entries.
Updated: 20 Mar 2024 10:27 EDT
Zensar Technologies Ltd
IN
@Hitesh Jain Hi, So which refresh action we should use here, I tried Refresh list, Refresh current row. But It is refreshing whole table content.
When I used Local action action after Delete Item I am getting
Below Error:
Failed to find a 'RULE-OBJ-FLOWACTION' with the name 'DELETEGRORECORD' that applies to 'H-H-Work-RD'.
There were 1 rules with this name in the rulebase, but none matched this request. The 1 rules named 'DELETEGRORECORD' defined in the rulebase are:
1 unrelated to applies-to class 'H-H-Work-RD', for example: 'H-H-Data-GroceryEdit'.