Table row drawer remain open on Field Set Save

  • 3
  • Question
  • Updated 4 years ago
  • Answered
Have a table row action that displays a drawer. The drawer contains a tab set and each tab set has a field set. The field set(s) have the standard Save / Cancel buttons.

Desire to have the drawer to remain open when clicking Save.

Any guidance is appreciated.

Regards,
Irvin

Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb

Posted 4 years ago

  • 3
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
I as well would like to see this possible. I have an iterative table that can as many levels deep a user creates. Real pain when everything is open to level 8 and something is saved on level 1.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
If you create a different model to show the details that are in the drawer - then the drawer will not close on model save.  Use the same techniques we have described previously for related data in drawers. 

1. On the new model do the following: 
a.  Turn off the Data load property in the advance tab. 
b. Create a condition that filters the ID field.  Leave value blank and make "Filterable default off" 

2. In the Drawer property go to "Before Load Actions" 
a. Add "Activate and Set value of Model Condition" to set the condition established in 1.b above.
b. Query Model. 

3. In the drawer add context conditions to all the components so they will pull in the correct record.  (make sure the data for the context condition is in both models). 

Then save buttons on field editors,  or in page titles will not close the drawer... 
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Configured as you described - just frickin awesome. Thanks!
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Hey Rob,

How would I sync the drawer related data model back to the table model? Ideally I would not have to re-query all rows table model.

My use case is as follows:

1. Click View More Data icon
2. Drawer expands with all relevant row data
3. User edits data
4. User clicks Save
5. Table row data is updated and drawer remains open

Hopefully this makes sense.

Regards,
Irvin
(Edited)
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb
How did you do those top tiles in this screenshot?
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
1. Add a Panel Set with type Custom Width.  

2. Add a panel

3. Insert a template into the panel

3. Use this HTML for the template:

  <div class = "nx-pagetitle-subtitle"> Total Tons </div>  
<div class = "nx-pagetitle-maintitle">{{Total_Quantity__c}}</div>
4. If you want to get "fancy", you can style the background color and text colors using CSS.

Enjoy!


(Edited)
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
I'd like this as well. The ability to requery just the row in context.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
At this point the only option you have is requerying the table model.  And the problem is that the requery forces the drawer to close.  I think we are in a catch 22 situation here. 

I'll add this idea to our list to of enhancements...
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
I can deal with this behavior for the meantime. Drawers are an awesome feature.
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Consolidated Save/Cancel buttons into one per best practice Have only one Save button per page.  Worked out nicely.


Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Glad to hear. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Does the drawer remain open when saving if there is edit being saved in the parent row?
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Only if I were to use two models per Rob's recommendation above.