I want to fetch some columns from the selected row and insert it into another tables on action click . I have added one action on list page.
*This post is locked for comments
And what did you tried so far?
If only select one raw, define a variable: l_anotherTable link to anther table
Under <XX> - OnAction()
l_anotherTable.RESET;
l_anotherTable.INIT;
CLEAR(l_anotherTable);
l_anotherTable.FIELD := Rec.FIELD;
...
l_anotherTable.INSERT(TRUE);
IF SECTECT MORE THAN ONE LINE, we need to define a variable link to currenct page source table: l_currenctTable
Under <XX> - OnAction()
l_anotherTable.RESET;
l_currenctTable.RESET;
CurrPage.SETSELECTIONFILTER(l_currenctTable);
if l_currenctTable.FINDFIRST THEN
REPEAT
l_anotherTable.INIT;
CLEAR(l_anotherTable);
l_anotherTable.FIELD := l_currenctTable.FIELD;
...
l_anotherTable.INSERT(TRUE);
UNTIL l_currenctTable.NEXT = 0;
You can use SETSELECTIONFILTER to get selected record and then do the insert
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156