cancel
Showing results for 
Search instead for 
Did you mean: 

Invalidate/Empty node when navigating between views

Former Member
0 Kudos

Hi

I have a main view which holds tables that contain basic details of relevant records. It is then possible to select the relevant record and use a button to fire a plug that loads a second view with the full record details.

The problem I'm having is when I return to the main view and select a different record the details of the first selection are still being displayed in the second view.

I've tried setting the node as empty and using lo_node->invalidate( ) when returning to the main view via the return button but as yet I've not achieved the solution I'm looking for.

Can anyone please suggest the most effective way handle this situation.

Thanks

Jon

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Alternatively  you can clear the node values and the set the values . This might help you.

If still your problem persists, pls revert back.

Thanks

KH

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

Thanks for all the helpful answers.

I inherited the project from another developer and it took me a while to spot that some of the data was being set as local variables and passed between the views. It was these that needed to be cleared and reset and not just the selected row being read from the main table as Rama pointed out.

I've used a little bit of everything from your suggestions but mainly removed the use of local variable and added it to the context.

Thanks again.

Jon.

former_member222068
Active Participant
0 Kudos

Hi Jon,

Try the following steps:

1. Clear the selection of the view1

   lo_nd_nodename->CLEAR_SELECTION( ).

2. Set the empty value to the node of second view, while navigating to the main view

   lo_nd_nodename->SET_STATIC_ATTRIBUTES_NULL( ).

 

   lo_nd_nodename->SET_STATIC_ATTRIBUTES( static_attributes = ls_nodename ).

3. Invalidate the node

   lo_nd_nodename->invalidate( ).

Hope this has to resolve the issue.

Thanks & Regards,

Sankar Gelivi

ramakrishnappa
Active Contributor
0 Kudos

Hi Jon,

I suspect, that you are always reading the first record ( used via lead selection ) from main table and setting into second view.

You have to check the logic of reading selected row and setting into context node of second view.

( if you don't fix the issue, share the piece of logic for further analysis )

Regards,

Rama

Gowtham
Contributor
0 Kudos

Hi Jon May,

Use the invalidate (lo_node->invalidate( )) before binding the values into the second view's table.

-Gowtham